diff --git a/equinix-openapi-metal/.openapi-generator/FILES b/equinix-openapi-metal/.openapi-generator/FILES index ade2307b3..9b4c3908b 100644 --- a/equinix-openapi-metal/.openapi-generator/FILES +++ b/equinix-openapi-metal/.openapi-generator/FILES @@ -266,6 +266,7 @@ docs/VirtualNetworkList.md docs/VlanFabricVcCreateInput.md docs/VlanVirtualCircuit.md docs/VlanVirtualCircuitCreateInput.md +docs/VlanVirtualCircuitType.md docs/VlanVirtualCircuitUpdateInput.md docs/VlansApi.md docs/Vrf.md @@ -285,6 +286,7 @@ docs/VrfRouteUpdateInput.md docs/VrfUpdateInput.md docs/VrfVirtualCircuit.md docs/VrfVirtualCircuitCreateInput.md +docs/VrfVirtualCircuitType.md docs/VrfVirtualCircuitUpdateInput.md docs/VrfsApi.md git_push.sh @@ -576,6 +578,7 @@ 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 @@ -594,6 +597,7 @@ 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 @@ -857,6 +861,7 @@ 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 @@ -875,4 +880,5 @@ 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/README.md b/equinix-openapi-metal/README.md index 2362b094b..9edfecce4 100644 --- a/equinix-openapi-metal/README.md +++ b/equinix-openapi-metal/README.md @@ -649,6 +649,7 @@ Class | Method | HTTP request | Description - [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) @@ -667,6 +668,7 @@ Class | Method | HTTP request | Description - [VrfUpdateInput](docs/VrfUpdateInput.md) - [VrfVirtualCircuit](docs/VrfVirtualCircuit.md) - [VrfVirtualCircuitCreateInput](docs/VrfVirtualCircuitCreateInput.md) + - [VrfVirtualCircuitType](docs/VrfVirtualCircuitType.md) - [VrfVirtualCircuitUpdateInput](docs/VrfVirtualCircuitUpdateInput.md) diff --git a/equinix-openapi-metal/api/openapi.yaml b/equinix-openapi-metal/api/openapi.yaml index f2ed02952..4064b1a61 100644 --- a/equinix-openapi-metal/api/openapi.yaml +++ b/equinix-openapi-metal/api/openapi.yaml @@ -13517,6 +13517,7 @@ components: 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: @@ -13538,6 +13539,7 @@ components: 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: @@ -13904,6 +13906,7 @@ components: 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: @@ -13925,6 +13928,7 @@ components: 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: @@ -14206,6 +14210,7 @@ components: 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: @@ -14227,6 +14232,7 @@ components: 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: @@ -23699,6 +23705,8 @@ components: items: type: string type: array + type: + $ref: '#/components/schemas/VlanVirtualCircuitType' virtual_network: $ref: '#/components/schemas/Href' vnid: @@ -23709,8 +23717,6 @@ components: updated_at: format: date-time type: string - required: - - virtual_network type: object VlanVirtualCircuitCreateInput: properties: @@ -23882,6 +23888,7 @@ components: 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: @@ -23903,6 +23910,7 @@ components: 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: @@ -24432,6 +24440,7 @@ components: 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: @@ -24453,6 +24462,7 @@ components: 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: @@ -24882,6 +24892,7 @@ components: 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: @@ -24903,6 +24914,7 @@ components: 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: @@ -25236,6 +25248,7 @@ components: 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: @@ -25257,6 +25270,7 @@ components: 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: @@ -25443,6 +25457,7 @@ components: 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: @@ -25464,6 +25479,7 @@ components: 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: @@ -25609,6 +25625,7 @@ components: 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: @@ -25630,6 +25647,7 @@ components: 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: @@ -25900,6 +25918,7 @@ components: 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: @@ -25921,6 +25940,7 @@ components: 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: @@ -26245,6 +26265,7 @@ components: 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: @@ -26266,6 +26287,7 @@ components: 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: @@ -26453,6 +26475,7 @@ components: 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: @@ -26474,6 +26497,7 @@ components: 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: @@ -26857,6 +26881,7 @@ components: 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: @@ -26878,6 +26903,7 @@ components: 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: @@ -27065,6 +27091,7 @@ components: 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: @@ -27086,6 +27113,7 @@ components: 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: @@ -27355,6 +27383,7 @@ components: 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: @@ -27376,6 +27405,7 @@ components: 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: @@ -27563,6 +27593,7 @@ components: 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: @@ -27584,6 +27615,7 @@ components: 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: @@ -27704,6 +27736,7 @@ components: 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: @@ -27794,6 +27827,8 @@ components: items: type: string type: array + type: + $ref: '#/components/schemas/VrfVirtualCircuitType' vrf: $ref: '#/components/schemas/Vrf' created_at: @@ -28076,10 +28111,18 @@ components: 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: diff --git a/equinix-openapi-metal/docs/VirtualCircuit.md b/equinix-openapi-metal/docs/VirtualCircuit.md index b2ce09eb6..e040ef32c 100644 --- a/equinix-openapi-metal/docs/VirtualCircuit.md +++ b/equinix-openapi-metal/docs/VirtualCircuit.md @@ -17,7 +17,8 @@ |**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] | -|**virtualNetwork** | [**Href**](Href.md) | | | +|**type** | **VrfVirtualCircuitType** | | [optional] | +|**virtualNetwork** | [**Href**](Href.md) | | [optional] | |**vnid** | **Integer** | | [optional] | |**createdAt** | **OffsetDateTime** | | [optional] | |**updatedAt** | **OffsetDateTime** | | [optional] | diff --git a/equinix-openapi-metal/docs/VlanVirtualCircuit.md b/equinix-openapi-metal/docs/VlanVirtualCircuit.md index 0311665c4..743271d06 100644 --- a/equinix-openapi-metal/docs/VlanVirtualCircuit.md +++ b/equinix-openapi-metal/docs/VlanVirtualCircuit.md @@ -17,7 +17,8 @@ |**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] | -|**virtualNetwork** | [**Href**](Href.md) | | | +|**type** | **VlanVirtualCircuitType** | | [optional] | +|**virtualNetwork** | [**Href**](Href.md) | | [optional] | |**vnid** | **Integer** | | [optional] | |**createdAt** | **OffsetDateTime** | | [optional] | |**updatedAt** | **OffsetDateTime** | | [optional] | diff --git a/equinix-openapi-metal/docs/VlanVirtualCircuitType.md b/equinix-openapi-metal/docs/VlanVirtualCircuitType.md new file mode 100644 index 000000000..e0c88d27c --- /dev/null +++ b/equinix-openapi-metal/docs/VlanVirtualCircuitType.md @@ -0,0 +1,11 @@ + + +# VlanVirtualCircuitType + +## Enum + + +* `VLAN` (value: `"vlan"`) + + + diff --git a/equinix-openapi-metal/docs/VrfVirtualCircuit.md b/equinix-openapi-metal/docs/VrfVirtualCircuit.md index 5a3ccf85b..82f9eb600 100644 --- a/equinix-openapi-metal/docs/VrfVirtualCircuit.md +++ b/equinix-openapi-metal/docs/VrfVirtualCircuit.md @@ -21,6 +21,7 @@ |**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] | diff --git a/equinix-openapi-metal/docs/VrfVirtualCircuitType.md b/equinix-openapi-metal/docs/VrfVirtualCircuitType.md new file mode 100644 index 000000000..0abe66437 --- /dev/null +++ b/equinix-openapi-metal/docs/VrfVirtualCircuitType.md @@ -0,0 +1,11 @@ + + +# VrfVirtualCircuitType + +## Enum + + +* `VRF` (value: `"vrf"`) + + + 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 index e76bd89e9..4a0deb01d 100644 --- 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 @@ -18,6 +18,7 @@ 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; 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 index 5bff12bf3..a881cc9f4 100644 --- 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 @@ -15,6 +15,7 @@ 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; @@ -164,6 +165,10 @@ public StatusEnum read(final JsonReader jsonReader) throws IOException { @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; @@ -401,6 +406,27 @@ public void setTags(List 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; @@ -411,7 +437,7 @@ public VlanVirtualCircuit virtualNetwork(Href virtualNetwork) { * Get virtualNetwork * @return virtualNetwork **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Href getVirtualNetwork() { return virtualNetwork; } @@ -549,6 +575,7 @@ public boolean equals(Object o) { 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) && @@ -558,7 +585,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(bill, description, id, name, nniVlan, port, project, speed, status, tags, virtualNetwork, vnid, createdAt, updatedAt, additionalProperties); + return Objects.hash(bill, description, id, name, nniVlan, port, project, speed, status, tags, type, virtualNetwork, vnid, createdAt, updatedAt, additionalProperties); } @Override @@ -575,6 +602,7 @@ public String toString() { 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"); @@ -612,6 +640,7 @@ private String toIndentedString(Object o) { openapiFields.add("speed"); openapiFields.add("status"); openapiFields.add("tags"); + openapiFields.add("type"); openapiFields.add("virtual_network"); openapiFields.add("vnid"); openapiFields.add("created_at"); @@ -619,7 +648,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("virtual_network"); } /** @@ -634,13 +662,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in VlanVirtualCircuit is not found in the empty JSON string", VlanVirtualCircuit.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : VlanVirtualCircuit.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())); @@ -666,8 +687,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti 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 required field `virtual_network` - Href.validateJsonElement(jsonObj.get("virtual_network")); + // 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 { 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 new file mode 100644 index 000000000..6944ddba5 --- /dev/null +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VlanVirtualCircuitType.java @@ -0,0 +1,70 @@ +/* + * Metal API + * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. + * + * The version of the OpenAPI document: 1.0.0 + * Contact: support@equinixmetal.com + * + * NOTE: This class is auto generated by 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.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); + } + } +} + 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 index e060ae1fa..491ad279e 100644 --- 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 @@ -16,6 +16,7 @@ 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; @@ -181,6 +182,10 @@ public StatusEnum read(final JsonReader jsonReader) throws IOException { @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; @@ -498,6 +503,27 @@ public void setTags(List 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; @@ -629,6 +655,7 @@ public boolean equals(Object o) { 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)&& @@ -637,7 +664,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(customerIp, description, id, md5, metalIp, name, port, nniVlan, peerAsn, project, speed, status, subnet, tags, vrf, createdAt, updatedAt, additionalProperties); + return Objects.hash(customerIp, description, id, md5, metalIp, name, port, nniVlan, peerAsn, project, speed, status, subnet, tags, type, vrf, createdAt, updatedAt, additionalProperties); } @Override @@ -658,6 +685,7 @@ public String toString() { 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"); @@ -698,6 +726,7 @@ private String toIndentedString(Object o) { openapiFields.add("status"); openapiFields.add("subnet"); openapiFields.add("tags"); + openapiFields.add("type"); openapiFields.add("vrf"); openapiFields.add("created_at"); openapiFields.add("updated_at"); 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 new file mode 100644 index 000000000..47b6b3aee --- /dev/null +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfVirtualCircuitType.java @@ -0,0 +1,70 @@ +/* + * Metal API + * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. + * + * The version of the OpenAPI document: 1.0.0 + * Contact: support@equinixmetal.com + * + * NOTE: This class is auto generated by 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.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); + } + } +} + 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 index 70eec4fb3..fdc17c28d 100644 --- 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 @@ -17,6 +17,7 @@ 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; @@ -125,6 +126,14 @@ public void tagsTest() { // TODO: test tags } + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + /** * Test the property 'virtualNetwork' */ 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 index 7f57851eb..b3dfb73eb 100644 --- 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 @@ -14,6 +14,7 @@ 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; @@ -122,6 +123,14 @@ public void tagsTest() { // TODO: test tags } + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + /** * Test the property 'virtualNetwork' */ 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 new file mode 100644 index 000000000..dc99e3c56 --- /dev/null +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VlanVirtualCircuitTypeTest.java @@ -0,0 +1,32 @@ +/* + * Metal API + * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. + * + * The version of the OpenAPI document: 1.0.0 + * Contact: support@equinixmetal.com + * + * NOTE: This class is auto generated by 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/VrfVirtualCircuitTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VrfVirtualCircuitTest.java index 03e6d77a1..6573a7d42 100644 --- 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 @@ -15,6 +15,7 @@ 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; @@ -155,6 +156,14 @@ public void tagsTest() { // TODO: test tags } + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + /** * Test the property 'vrf' */ 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 new file mode 100644 index 000000000..8e03c2f1a --- /dev/null +++ b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VrfVirtualCircuitTypeTest.java @@ -0,0 +1,32 @@ +/* + * Metal API + * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. + * + * The version of the OpenAPI document: 1.0.0 + * Contact: support@equinixmetal.com + * + * NOTE: This class is auto generated by 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/patches/spec.fetched.json/20231012-add-vc-enum-type.patch b/patches/spec.fetched.json/20231012-add-vc-enum-type.patch new file mode 100644 index 000000000..478333d0a --- /dev/null +++ b/patches/spec.fetched.json/20231012-add-vc-enum-type.patch @@ -0,0 +1,46 @@ +diff --git a/spec/oas3.patched/openapi/public/components/schemas/VlanVirtualCircuit.yaml b/spec/oas3.patched/openapi/public/components/schemas/VlanVirtualCircuit.yaml +index 2d150b05..08d9ccda 100644 +--- a/spec/oas3.patched/openapi/public/components/schemas/VlanVirtualCircuit.yaml ++++ b/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/VlanVirtualCircuitType.yaml b/spec/oas3.patched/openapi/public/components/schemas/VlanVirtualCircuitType.yaml +new file mode 100644 +index 00000000..76e2a359 +--- /dev/null ++++ b/spec/oas3.patched/openapi/public/components/schemas/VlanVirtualCircuitType.yaml +@@ -0,0 +1,3 @@ ++enum: ++- vlan ++type: string +diff --git a/spec/oas3.patched/openapi/public/components/schemas/VrfVirtualCircuit.yaml b/spec/oas3.patched/openapi/public/components/schemas/VrfVirtualCircuit.yaml +index 0ab53602..54808d42 100644 +--- a/spec/oas3.patched/openapi/public/components/schemas/VrfVirtualCircuit.yaml ++++ b/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/components/schemas/VrfVirtualCircuitType.yaml b/spec/oas3.patched/openapi/public/components/schemas/VrfVirtualCircuitType.yaml +new file mode 100644 +index 00000000..6d255012 +--- /dev/null ++++ b/spec/oas3.patched/openapi/public/components/schemas/VrfVirtualCircuitType.yaml +@@ -0,0 +1,3 @@ ++enum: ++- vrf ++type: string diff --git a/spec/oas3.fetched/openapi/public/components/schemas/VlanVirtualCircuit.yaml b/spec/oas3.fetched/openapi/public/components/schemas/VlanVirtualCircuit.yaml index 75155eead..2d150b057 100644 --- a/spec/oas3.fetched/openapi/public/components/schemas/VlanVirtualCircuit.yaml +++ b/spec/oas3.fetched/openapi/public/components/schemas/VlanVirtualCircuit.yaml @@ -1,5 +1,3 @@ -required: -- virtual_network properties: bill: type: boolean @@ -50,6 +48,9 @@ properties: items: type: string type: array + type: + enum: + - vlan virtual_network: $ref: './Href.yaml' vnid: diff --git a/spec/oas3.fetched/openapi/public/components/schemas/VrfVirtualCircuit.yaml b/spec/oas3.fetched/openapi/public/components/schemas/VrfVirtualCircuit.yaml index 350c260e3..0ab536025 100644 --- a/spec/oas3.fetched/openapi/public/components/schemas/VrfVirtualCircuit.yaml +++ b/spec/oas3.fetched/openapi/public/components/schemas/VrfVirtualCircuit.yaml @@ -75,6 +75,9 @@ properties: items: type: string type: array + type: + enum: + - vrf vrf: $ref: './Vrf.yaml' created_at: diff --git a/spec/oas3.patched/openapi/public/components/schemas/VlanVirtualCircuit.yaml b/spec/oas3.patched/openapi/public/components/schemas/VlanVirtualCircuit.yaml index 75155eead..08d9ccdab 100644 --- a/spec/oas3.patched/openapi/public/components/schemas/VlanVirtualCircuit.yaml +++ b/spec/oas3.patched/openapi/public/components/schemas/VlanVirtualCircuit.yaml @@ -1,5 +1,3 @@ -required: -- virtual_network properties: bill: type: boolean @@ -50,6 +48,8 @@ properties: items: type: string type: array + type: + $ref: './VlanVirtualCircuitType.yaml' virtual_network: $ref: './Href.yaml' vnid: diff --git a/spec/oas3.patched/openapi/public/components/schemas/VlanVirtualCircuitType.yaml b/spec/oas3.patched/openapi/public/components/schemas/VlanVirtualCircuitType.yaml new file mode 100644 index 000000000..76e2a3597 --- /dev/null +++ b/spec/oas3.patched/openapi/public/components/schemas/VlanVirtualCircuitType.yaml @@ -0,0 +1,3 @@ +enum: +- vlan +type: string diff --git a/spec/oas3.patched/openapi/public/components/schemas/VrfVirtualCircuit.yaml b/spec/oas3.patched/openapi/public/components/schemas/VrfVirtualCircuit.yaml index 350c260e3..54808d42f 100644 --- a/spec/oas3.patched/openapi/public/components/schemas/VrfVirtualCircuit.yaml +++ b/spec/oas3.patched/openapi/public/components/schemas/VrfVirtualCircuit.yaml @@ -75,6 +75,8 @@ properties: items: type: string type: array + type: + $ref: './VrfVirtualCircuitType.yaml' vrf: $ref: './Vrf.yaml' created_at: diff --git a/spec/oas3.patched/openapi/public/components/schemas/VrfVirtualCircuitType.yaml b/spec/oas3.patched/openapi/public/components/schemas/VrfVirtualCircuitType.yaml new file mode 100644 index 000000000..6d255012b --- /dev/null +++ b/spec/oas3.patched/openapi/public/components/schemas/VrfVirtualCircuitType.yaml @@ -0,0 +1,3 @@ +enum: +- vrf +type: string