From f66025da820cfe692e28017b6c6413b86bf53f75 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 5 Sep 2023 16:08:44 +0000 Subject: [PATCH 1/3] sync: fetch 2023-09-05 spec --- .../public/components/schemas/DedicatedPortCreateInput.yaml | 6 ++++++ .../openapi/public/components/schemas/Device.yaml | 4 ++++ spec/oas3.fetched/openapi/public/paths/devices/id.yaml | 2 +- 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/spec/oas3.fetched/openapi/public/components/schemas/DedicatedPortCreateInput.yaml b/spec/oas3.fetched/openapi/public/components/schemas/DedicatedPortCreateInput.yaml index 973a84102..bfd4f8146 100644 --- a/spec/oas3.fetched/openapi/public/components/schemas/DedicatedPortCreateInput.yaml +++ b/spec/oas3.fetched/openapi/public/components/schemas/DedicatedPortCreateInput.yaml @@ -1,4 +1,7 @@ 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. type: string @@ -39,6 +42,9 @@ properties: type: string enum: - dedicated + use_case: + description: The intended use case of the dedicated port. + type: string required: - name - metro diff --git a/spec/oas3.fetched/openapi/public/components/schemas/Device.yaml b/spec/oas3.fetched/openapi/public/components/schemas/Device.yaml index caed147d7..8e3eb270e 100644 --- a/spec/oas3.fetched/openapi/public/components/schemas/Device.yaml +++ b/spec/oas3.fetched/openapi/public/components/schemas/Device.yaml @@ -20,6 +20,10 @@ properties: type: string facility: $ref: './Facility.yaml' + firmware_set_id: + description: The UUID of the firmware set to associate with the device. + format: uuid + type: string hardware_reservation: $ref: './Href.yaml' hostname: diff --git a/spec/oas3.fetched/openapi/public/paths/devices/id.yaml b/spec/oas3.fetched/openapi/public/paths/devices/id.yaml index 867a0832c..1eb2ed9e4 100644 --- a/spec/oas3.fetched/openapi/public/paths/devices/id.yaml +++ b/spec/oas3.fetched/openapi/public/paths/devices/id.yaml @@ -106,7 +106,7 @@ put: application/json: schema: $ref: '../../components/schemas/DeviceUpdateInput.yaml' - description: Facility to update + description: Device to update required: true responses: "200": From 72c8db0db3895b307faf3eb23de817669902b6d4 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 5 Sep 2023 16:08:44 +0000 Subject: [PATCH 2/3] sync: apply patches to 2023-09-05 spec --- .../public/components/schemas/DedicatedPortCreateInput.yaml | 6 ++++++ .../openapi/public/components/schemas/Device.yaml | 4 ++++ spec/oas3.patched/openapi/public/paths/devices/id.yaml | 2 +- 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/spec/oas3.patched/openapi/public/components/schemas/DedicatedPortCreateInput.yaml b/spec/oas3.patched/openapi/public/components/schemas/DedicatedPortCreateInput.yaml index 973a84102..bfd4f8146 100644 --- a/spec/oas3.patched/openapi/public/components/schemas/DedicatedPortCreateInput.yaml +++ b/spec/oas3.patched/openapi/public/components/schemas/DedicatedPortCreateInput.yaml @@ -1,4 +1,7 @@ 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. type: string @@ -39,6 +42,9 @@ properties: type: string enum: - dedicated + use_case: + description: The intended use case of the dedicated port. + type: string required: - name - metro diff --git a/spec/oas3.patched/openapi/public/components/schemas/Device.yaml b/spec/oas3.patched/openapi/public/components/schemas/Device.yaml index 46ecd2d1b..f7902c343 100644 --- a/spec/oas3.patched/openapi/public/components/schemas/Device.yaml +++ b/spec/oas3.patched/openapi/public/components/schemas/Device.yaml @@ -20,6 +20,10 @@ properties: type: string facility: $ref: './Facility.yaml' + firmware_set_id: + description: The UUID of the firmware set to associate with the device. + format: uuid + type: string hardware_reservation: $ref: './HardwareReservation.yaml' hostname: diff --git a/spec/oas3.patched/openapi/public/paths/devices/id.yaml b/spec/oas3.patched/openapi/public/paths/devices/id.yaml index 867a0832c..1eb2ed9e4 100644 --- a/spec/oas3.patched/openapi/public/paths/devices/id.yaml +++ b/spec/oas3.patched/openapi/public/paths/devices/id.yaml @@ -106,7 +106,7 @@ put: application/json: schema: $ref: '../../components/schemas/DeviceUpdateInput.yaml' - description: Facility to update + description: Device to update required: true responses: "200": From cf02d3b9f818aef9f2528efa321b40be8efe703c Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 5 Sep 2023 16:09:53 +0000 Subject: [PATCH 3/3] sync: generate client with patched 2023-09-05 spec --- equinix-openapi-metal/api/openapi.yaml | 15 +++- ...reateOrganizationInterconnectionRequest.md | 2 + .../docs/DedicatedPortCreateInput.md | 2 + equinix-openapi-metal/docs/Device.md | 1 + equinix-openapi-metal/docs/DevicesApi.md | 4 +- .../openapi/metal/v1/api/DevicesApi.java | 8 +-- .../v1/model/DedicatedPortCreateInput.java | 68 ++++++++++++++++++- .../openapi/metal/v1/model/Device.java | 33 ++++++++- ...rganizationInterconnectionRequestTest.java | 16 +++++ .../model/DedicatedPortCreateInputTest.java | 16 +++++ .../openapi/metal/v1/model/DeviceTest.java | 8 +++ 11 files changed, 162 insertions(+), 11 deletions(-) diff --git a/equinix-openapi-metal/api/openapi.yaml b/equinix-openapi-metal/api/openapi.yaml index 4ae6fee6c..f99d2fe8a 100644 --- a/equinix-openapi-metal/api/openapi.yaml +++ b/equinix-openapi-metal/api/openapi.yaml @@ -1612,7 +1612,7 @@ paths: application/json: schema: $ref: '#/components/schemas/DeviceUpdateInput' - description: Facility to update + description: Device to update required: true responses: "200": @@ -14373,6 +14373,9 @@ components: 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 @@ -14418,6 +14421,9 @@ components: enum: - dedicated type: string + use_case: + description: The intended use case of the dedicated port. + type: string required: - metro - name @@ -14669,6 +14675,7 @@ components: pricing: "{}" slug: slug distro_label: distro_label + firmware_set_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 billing_cycle: billing_cycle customdata: key: "" @@ -14967,6 +14974,10 @@ components: 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: @@ -15580,6 +15591,7 @@ components: pricing: "{}" slug: slug distro_label: distro_label + firmware_set_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 billing_cycle: billing_cycle customdata: key: "" @@ -16101,6 +16113,7 @@ components: pricing: "{}" slug: slug distro_label: distro_label + firmware_set_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 billing_cycle: billing_cycle customdata: key: "" diff --git a/equinix-openapi-metal/docs/CreateOrganizationInterconnectionRequest.md b/equinix-openapi-metal/docs/CreateOrganizationInterconnectionRequest.md index e25b7b949..3bf050c13 100644 --- a/equinix-openapi-metal/docs/CreateOrganizationInterconnectionRequest.md +++ b/equinix-openapi-metal/docs/CreateOrganizationInterconnectionRequest.md @@ -7,6 +7,7 @@ | 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. | | @@ -17,6 +18,7 @@ |**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'. | | +|**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. | | diff --git a/equinix-openapi-metal/docs/DedicatedPortCreateInput.md b/equinix-openapi-metal/docs/DedicatedPortCreateInput.md index cf6382cc2..e255e69ed 100644 --- a/equinix-openapi-metal/docs/DedicatedPortCreateInput.md +++ b/equinix-openapi-metal/docs/DedicatedPortCreateInput.md @@ -7,6 +7,7 @@ | 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. | | @@ -17,6 +18,7 @@ |**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] | diff --git a/equinix-openapi-metal/docs/Device.md b/equinix-openapi-metal/docs/Device.md index 7c750528f..3d2f5ec89 100644 --- a/equinix-openapi-metal/docs/Device.md +++ b/equinix-openapi-metal/docs/Device.md @@ -15,6 +15,7 @@ |**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] | diff --git a/equinix-openapi-metal/docs/DevicesApi.md b/equinix-openapi-metal/docs/DevicesApi.md index 723c03693..04bc8a475 100644 --- a/equinix-openapi-metal/docs/DevicesApi.md +++ b/equinix-openapi-metal/docs/DevicesApi.md @@ -1366,7 +1366,7 @@ public class Example { DevicesApi apiInstance = new DevicesApi(defaultClient); UUID id = UUID.randomUUID(); // UUID | Device UUID - DeviceUpdateInput deviceUpdateInput = new DeviceUpdateInput(); // DeviceUpdateInput | Facility to update + 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 { @@ -1388,7 +1388,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **id** | **UUID**| Device UUID | | -| **deviceUpdateInput** | [**DeviceUpdateInput**](DeviceUpdateInput.md)| Facility to update | | +| **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] | 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 index a7f763ac6..26ada7eca 100644 --- 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 @@ -2760,7 +2760,7 @@ public okhttp3.Call performActionAsync(UUID id, DeviceActionInput deviceActionIn /** * Build call for updateDevice * @param id Device UUID (required) - * @param deviceUpdateInput Facility to update (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 @@ -2850,7 +2850,7 @@ private okhttp3.Call updateDeviceValidateBeforeCall(UUID id, DeviceUpdateInput d * Update the device * Updates the device. * @param id Device UUID (required) - * @param deviceUpdateInput Facility to update (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 @@ -2874,7 +2874,7 @@ public Device updateDevice(UUID id, DeviceUpdateInput deviceUpdateInput, List updateDeviceWithHttpInfo(UUID id, DeviceUpdateInput d * Update the device (asynchronously) * Updates the device. * @param id Device UUID (required) - * @param deviceUpdateInput Facility to update (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 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 index 8af434dfa..da192962c 100644 --- 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 @@ -54,6 +54,10 @@ */ @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; @@ -186,9 +190,34 @@ public TypeEnum read(final JsonReader jsonReader) throws IOException { @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; @@ -406,6 +435,27 @@ 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 @@ -461,7 +511,8 @@ public boolean equals(Object o) { return false; } DedicatedPortCreateInput dedicatedPortCreateInput = (DedicatedPortCreateInput) o; - return Objects.equals(this.contactEmail, dedicatedPortCreateInput.contactEmail) && + 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) && @@ -470,19 +521,21 @@ public boolean equals(Object o) { 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.type, dedicatedPortCreateInput.type) && + Objects.equals(this.useCase, dedicatedPortCreateInput.useCase)&& Objects.equals(this.additionalProperties, dedicatedPortCreateInput.additionalProperties); } @Override public int hashCode() { - return Objects.hash(contactEmail, description, metro, mode, name, project, redundancy, speed, tags, type, additionalProperties); + 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"); @@ -493,6 +546,7 @@ public String toString() { 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(); @@ -516,6 +570,7 @@ private String toIndentedString(Object o) { 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"); @@ -526,6 +581,7 @@ private String toIndentedString(Object o) { 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(); @@ -554,6 +610,9 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); } } + 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())); } @@ -582,6 +641,9 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { 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("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 { 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 index 5794ec15d..33736458c 100644 --- 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 @@ -104,6 +104,10 @@ public class Device { @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; @@ -482,6 +486,27 @@ public void setFacility(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; @@ -1314,6 +1339,7 @@ public boolean equals(Object o) { 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) && @@ -1353,7 +1379,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(alwaysPxe, billingCycle, bondingMode, createdAt, createdBy, customdata, description, facility, 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); + 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 @@ -1368,6 +1394,7 @@ public String toString() { 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"); @@ -1433,6 +1460,7 @@ private String toIndentedString(Object o) { openapiFields.add("customdata"); openapiFields.add("description"); openapiFields.add("facility"); + openapiFields.add("firmware_set_id"); openapiFields.add("hardware_reservation"); openapiFields.add("hostname"); openapiFields.add("href"); @@ -1498,6 +1526,9 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj.get("facility") != null && !jsonObj.get("facility").isJsonNull()) { Facility.validateJsonObject(jsonObj.getAsJsonObject("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.validateJsonObject(jsonObj.getAsJsonObject("hardware_reservation")); 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 index fa177a23a..76302e19f 100644 --- 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 @@ -43,6 +43,14 @@ public void testCreateOrganizationInterconnectionRequest() { // TODO: test CreateOrganizationInterconnectionRequest } + /** + * Test the property 'billingAccountName' + */ + @Test + public void billingAccountNameTest() { + // TODO: test billingAccountName + } + /** * Test the property 'contactEmail' */ @@ -123,6 +131,14 @@ public void typeTest() { // TODO: test type } + /** + * Test the property 'useCase' + */ + @Test + public void useCaseTest() { + // TODO: test useCase + } + /** * Test the property 'serviceTokenType' */ 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 index 0a6933813..e66f7a394 100644 --- 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 @@ -39,6 +39,14 @@ public void testDedicatedPortCreateInput() { // TODO: test DedicatedPortCreateInput } + /** + * Test the property 'billingAccountName' + */ + @Test + public void billingAccountNameTest() { + // TODO: test billingAccountName + } + /** * Test the property 'contactEmail' */ @@ -119,4 +127,12 @@ 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/DeviceTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/DeviceTest.java index faf23db6b..5436a5ee2 100644 --- 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 @@ -121,6 +121,14 @@ public void facilityTest() { // TODO: test facility } + /** + * Test the property 'firmwareSetId' + */ + @Test + public void firmwareSetIdTest() { + // TODO: test firmwareSetId + } + /** * Test the property 'hardwareReservation' */