From cd035c75438d9ab83502909975b643db5c0a789a Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 16 Oct 2023 10:48:14 -0500 Subject: [PATCH] feat: API Sync by GitHub Action (2023-10-12) (#165) This API Sync PR was automated through [GitHub Actions workflow_displatch](https://github.com/equinix-labs/metal-go/actions?query=event%3Aworkflow_dispatch) on 2023-10-12. * latest Swagger is fetched * patches have been applied * generated client has been updated --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- API.md | 1 + api/openapi.yaml | 69 ++- docs/VirtualCircuit.md | 112 ++++- docs/VlanVirtualCircuit.md | 105 ++++- docs/VlanVirtualCircuitType.md | 11 + docs/VrfVirtualCircuit.md | 35 +- metal/v1/.openapi-generator/FILES | 2 + metal/v1/model_vlan_virtual_circuit.go | 406 ++++++++++++------ metal/v1/model_vlan_virtual_circuit_type.go | 109 +++++ metal/v1/model_vrf_virtual_circuit.go | 72 +++- .../schemas/VlanVirtualCircuit.yaml | 16 +- .../components/schemas/VrfVirtualCircuit.yaml | 6 + .../schemas/VlanVirtualCircuit.yaml | 16 +- .../components/schemas/VrfVirtualCircuit.yaml | 6 + 14 files changed, 737 insertions(+), 229 deletions(-) create mode 100644 docs/VlanVirtualCircuitType.md create mode 100644 metal/v1/model_vlan_virtual_circuit_type.go diff --git a/API.md b/API.md index 43e138b8..463577a4 100644 --- a/API.md +++ b/API.md @@ -658,6 +658,7 @@ Class | Method | HTTP request | Description - [VlanVirtualCircuit](docs/VlanVirtualCircuit.md) - [VlanVirtualCircuitCreateInput](docs/VlanVirtualCircuitCreateInput.md) - [VlanVirtualCircuitStatus](docs/VlanVirtualCircuitStatus.md) + - [VlanVirtualCircuitType](docs/VlanVirtualCircuitType.md) - [VlanVirtualCircuitUpdateInput](docs/VlanVirtualCircuitUpdateInput.md) - [Vrf](docs/Vrf.md) - [VrfCreateInput](docs/VrfCreateInput.md) diff --git a/api/openapi.yaml b/api/openapi.yaml index 95a7a813..37c4c6ee 100644 --- a/api/openapi.yaml +++ b/api/openapi.yaml @@ -13129,6 +13129,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: 9 tags: @@ -13150,6 +13151,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: 9 tags: @@ -13410,6 +13412,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: 9 tags: @@ -13431,6 +13434,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: 9 tags: @@ -13870,6 +13874,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: 9 tags: @@ -13891,6 +13896,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: 9 tags: @@ -14151,6 +14157,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: 9 tags: @@ -14172,6 +14179,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: 9 tags: @@ -14532,6 +14540,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: 9 tags: @@ -14553,6 +14562,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: 9 tags: @@ -14813,6 +14823,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: 9 tags: @@ -14834,6 +14845,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: 9 tags: @@ -24279,6 +24291,8 @@ components: items: type: string type: array + type: + $ref: '#/components/schemas/VlanVirtualCircuit_type' virtual_network: $ref: '#/components/schemas/Href' vnid: @@ -24289,18 +24303,6 @@ components: updated_at: format: date-time type: string - required: - - bill - - description - - id - - name - - nni_vlan - - port - - project - - status - - tags - - virtual_network - - vnid type: object VlanVirtualCircuitCreateInput: properties: @@ -24473,6 +24475,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: 9 tags: @@ -24494,6 +24497,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: 9 tags: @@ -25011,6 +25015,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: 9 tags: @@ -25032,6 +25037,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: 9 tags: @@ -25462,6 +25468,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: 9 tags: @@ -25483,6 +25490,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: 9 tags: @@ -25819,6 +25827,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: 9 tags: @@ -25840,6 +25849,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: 9 tags: @@ -26027,6 +26037,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: 9 tags: @@ -26048,6 +26059,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: 9 tags: @@ -26194,6 +26206,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: 9 tags: @@ -26215,6 +26228,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: 9 tags: @@ -26564,6 +26578,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: 9 tags: @@ -26585,6 +26600,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: 9 tags: @@ -26845,6 +26861,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: 9 tags: @@ -26866,6 +26883,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: 9 tags: @@ -27257,6 +27275,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: 9 tags: @@ -27278,6 +27297,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: 9 tags: @@ -27538,6 +27558,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: 9 tags: @@ -27559,6 +27580,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: 9 tags: @@ -27748,6 +27770,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: 9 tags: @@ -27769,6 +27792,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: 9 tags: @@ -28214,6 +28238,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: 9 tags: @@ -28235,6 +28260,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: 9 tags: @@ -28495,6 +28521,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: 9 tags: @@ -28516,6 +28543,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: 9 tags: @@ -28705,6 +28733,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: 9 tags: @@ -28726,6 +28755,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: 9 tags: @@ -29074,6 +29104,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: 9 tags: @@ -29095,6 +29126,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: 9 tags: @@ -29355,6 +29387,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: 9 tags: @@ -29376,6 +29409,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: 9 tags: @@ -29565,6 +29599,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: 9 tags: @@ -29586,6 +29621,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: 9 tags: @@ -29706,6 +29742,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: 9 tags: @@ -29773,6 +29810,8 @@ components: items: type: string type: array + type: + $ref: '#/components/schemas/VrfIpReservation_type' vrf: $ref: '#/components/schemas/Vrf' created_at: @@ -29781,6 +29820,8 @@ components: updated_at: format: date-time type: string + required: + - vrf type: object VrfVirtualCircuitCreateInput: properties: @@ -31157,6 +31198,10 @@ components: - deactivation_failed - delete_failed type: string + VlanVirtualCircuit_type: + enum: + - vlan + type: string VrfIpReservation_type: enum: - vrf diff --git a/docs/VirtualCircuit.md b/docs/VirtualCircuit.md index 5efc79bb..81e3739f 100644 --- a/docs/VirtualCircuit.md +++ b/docs/VirtualCircuit.md @@ -4,18 +4,19 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Bill** | **bool** | 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. | [default to false] -**Description** | **string** | | -**Id** | **string** | | -**Name** | **string** | | -**NniVlan** | **int32** | | -**Port** | [**Href**](Href.md) | | -**Project** | [**Href**](Href.md) | | +**Bill** | Pointer to **bool** | 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] [default to false] +**Description** | Pointer to **string** | | [optional] +**Id** | Pointer to **string** | | [optional] +**Name** | Pointer to **string** | | [optional] +**NniVlan** | Pointer to **int32** | | [optional] +**Port** | Pointer to [**Href**](Href.md) | | [optional] +**Project** | Pointer to [**Href**](Href.md) | | [optional] **Speed** | Pointer to **int32** | integer representing bps speed | [optional] -**Status** | [**VrfVirtualCircuitStatus**](VrfVirtualCircuitStatus.md) | | -**Tags** | **[]string** | | -**VirtualNetwork** | [**Href**](Href.md) | | -**Vnid** | **int32** | | +**Status** | Pointer to [**VrfVirtualCircuitStatus**](VrfVirtualCircuitStatus.md) | | [optional] +**Tags** | Pointer to **[]string** | | [optional] +**Type** | Pointer to [**VrfIpReservationType**](VrfIpReservationType.md) | | [optional] +**VirtualNetwork** | Pointer to [**Href**](Href.md) | | [optional] +**Vnid** | Pointer to **int32** | | [optional] **CreatedAt** | Pointer to **time.Time** | | [optional] **UpdatedAt** | Pointer to **time.Time** | | [optional] **CustomerIp** | Pointer to **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] @@ -23,13 +24,13 @@ Name | Type | Description | Notes **MetalIp** | Pointer to **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** | Pointer to **int32** | The peer ASN that will be used with the VRF on the Virtual Circuit. | [optional] **Subnet** | Pointer to **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** | Pointer to [**Vrf**](Vrf.md) | | [optional] +**Vrf** | [**Vrf**](Vrf.md) | | ## Methods ### NewVirtualCircuit -`func NewVirtualCircuit(bill bool, description string, id string, name string, nniVlan int32, port Href, project Href, status VrfVirtualCircuitStatus, tags []string, virtualNetwork Href, vnid int32, ) *VirtualCircuit` +`func NewVirtualCircuit(vrf Vrf, ) *VirtualCircuit` NewVirtualCircuit instantiates a new VirtualCircuit object This constructor will assign default values to properties that have it defined, @@ -63,6 +64,11 @@ and a boolean to check if the value has been set. SetBill sets Bill field to given value. +### HasBill + +`func (o *VirtualCircuit) HasBill() bool` + +HasBill returns a boolean if a field has been set. ### GetDescription @@ -83,6 +89,11 @@ and a boolean to check if the value has been set. SetDescription sets Description field to given value. +### HasDescription + +`func (o *VirtualCircuit) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. ### GetId @@ -103,6 +114,11 @@ and a boolean to check if the value has been set. SetId sets Id field to given value. +### HasId + +`func (o *VirtualCircuit) HasId() bool` + +HasId returns a boolean if a field has been set. ### GetName @@ -123,6 +139,11 @@ and a boolean to check if the value has been set. SetName sets Name field to given value. +### HasName + +`func (o *VirtualCircuit) HasName() bool` + +HasName returns a boolean if a field has been set. ### GetNniVlan @@ -143,6 +164,11 @@ and a boolean to check if the value has been set. SetNniVlan sets NniVlan field to given value. +### HasNniVlan + +`func (o *VirtualCircuit) HasNniVlan() bool` + +HasNniVlan returns a boolean if a field has been set. ### GetPort @@ -163,6 +189,11 @@ and a boolean to check if the value has been set. SetPort sets Port field to given value. +### HasPort + +`func (o *VirtualCircuit) HasPort() bool` + +HasPort returns a boolean if a field has been set. ### GetProject @@ -183,6 +214,11 @@ and a boolean to check if the value has been set. SetProject sets Project field to given value. +### HasProject + +`func (o *VirtualCircuit) HasProject() bool` + +HasProject returns a boolean if a field has been set. ### GetSpeed @@ -228,6 +264,11 @@ and a boolean to check if the value has been set. SetStatus sets Status field to given value. +### HasStatus + +`func (o *VirtualCircuit) HasStatus() bool` + +HasStatus returns a boolean if a field has been set. ### GetTags @@ -248,6 +289,36 @@ and a boolean to check if the value has been set. SetTags sets Tags field to given value. +### HasTags + +`func (o *VirtualCircuit) HasTags() bool` + +HasTags returns a boolean if a field has been set. + +### GetType + +`func (o *VirtualCircuit) GetType() VrfIpReservationType` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *VirtualCircuit) GetTypeOk() (*VrfIpReservationType, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *VirtualCircuit) SetType(v VrfIpReservationType)` + +SetType sets Type field to given value. + +### HasType + +`func (o *VirtualCircuit) HasType() bool` + +HasType returns a boolean if a field has been set. ### GetVirtualNetwork @@ -268,6 +339,11 @@ and a boolean to check if the value has been set. SetVirtualNetwork sets VirtualNetwork field to given value. +### HasVirtualNetwork + +`func (o *VirtualCircuit) HasVirtualNetwork() bool` + +HasVirtualNetwork returns a boolean if a field has been set. ### GetVnid @@ -288,6 +364,11 @@ and a boolean to check if the value has been set. SetVnid sets Vnid field to given value. +### HasVnid + +`func (o *VirtualCircuit) HasVnid() bool` + +HasVnid returns a boolean if a field has been set. ### GetCreatedAt @@ -483,11 +564,6 @@ and a boolean to check if the value has been set. SetVrf sets Vrf field to given value. -### HasVrf - -`func (o *VirtualCircuit) HasVrf() bool` - -HasVrf returns a boolean if a field has been set. [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/VlanVirtualCircuit.md b/docs/VlanVirtualCircuit.md index d58ef66e..8ce8820f 100644 --- a/docs/VlanVirtualCircuit.md +++ b/docs/VlanVirtualCircuit.md @@ -4,18 +4,19 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Bill** | **bool** | 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. | [default to false] -**Description** | **string** | | -**Id** | **string** | | -**Name** | **string** | | -**NniVlan** | **int32** | | -**Port** | [**Href**](Href.md) | | -**Project** | [**Href**](Href.md) | | +**Bill** | Pointer to **bool** | 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] [default to false] +**Description** | Pointer to **string** | | [optional] +**Id** | Pointer to **string** | | [optional] +**Name** | Pointer to **string** | | [optional] +**NniVlan** | Pointer to **int32** | | [optional] +**Port** | Pointer to [**Href**](Href.md) | | [optional] +**Project** | Pointer to [**Href**](Href.md) | | [optional] **Speed** | Pointer to **int32** | 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** | [**VlanVirtualCircuitStatus**](VlanVirtualCircuitStatus.md) | | -**Tags** | **[]string** | | -**VirtualNetwork** | [**Href**](Href.md) | | -**Vnid** | **int32** | | +**Status** | Pointer to [**VlanVirtualCircuitStatus**](VlanVirtualCircuitStatus.md) | | [optional] +**Tags** | Pointer to **[]string** | | [optional] +**Type** | Pointer to [**VlanVirtualCircuitType**](VlanVirtualCircuitType.md) | | [optional] +**VirtualNetwork** | Pointer to [**Href**](Href.md) | | [optional] +**Vnid** | Pointer to **int32** | | [optional] **CreatedAt** | Pointer to **time.Time** | | [optional] **UpdatedAt** | Pointer to **time.Time** | | [optional] @@ -23,7 +24,7 @@ Name | Type | Description | Notes ### NewVlanVirtualCircuit -`func NewVlanVirtualCircuit(bill bool, description string, id string, name string, nniVlan int32, port Href, project Href, status VlanVirtualCircuitStatus, tags []string, virtualNetwork Href, vnid int32, ) *VlanVirtualCircuit` +`func NewVlanVirtualCircuit() *VlanVirtualCircuit` NewVlanVirtualCircuit instantiates a new VlanVirtualCircuit object This constructor will assign default values to properties that have it defined, @@ -57,6 +58,11 @@ and a boolean to check if the value has been set. SetBill sets Bill field to given value. +### HasBill + +`func (o *VlanVirtualCircuit) HasBill() bool` + +HasBill returns a boolean if a field has been set. ### GetDescription @@ -77,6 +83,11 @@ and a boolean to check if the value has been set. SetDescription sets Description field to given value. +### HasDescription + +`func (o *VlanVirtualCircuit) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. ### GetId @@ -97,6 +108,11 @@ and a boolean to check if the value has been set. SetId sets Id field to given value. +### HasId + +`func (o *VlanVirtualCircuit) HasId() bool` + +HasId returns a boolean if a field has been set. ### GetName @@ -117,6 +133,11 @@ and a boolean to check if the value has been set. SetName sets Name field to given value. +### HasName + +`func (o *VlanVirtualCircuit) HasName() bool` + +HasName returns a boolean if a field has been set. ### GetNniVlan @@ -137,6 +158,11 @@ and a boolean to check if the value has been set. SetNniVlan sets NniVlan field to given value. +### HasNniVlan + +`func (o *VlanVirtualCircuit) HasNniVlan() bool` + +HasNniVlan returns a boolean if a field has been set. ### GetPort @@ -157,6 +183,11 @@ and a boolean to check if the value has been set. SetPort sets Port field to given value. +### HasPort + +`func (o *VlanVirtualCircuit) HasPort() bool` + +HasPort returns a boolean if a field has been set. ### GetProject @@ -177,6 +208,11 @@ and a boolean to check if the value has been set. SetProject sets Project field to given value. +### HasProject + +`func (o *VlanVirtualCircuit) HasProject() bool` + +HasProject returns a boolean if a field has been set. ### GetSpeed @@ -222,6 +258,11 @@ and a boolean to check if the value has been set. SetStatus sets Status field to given value. +### HasStatus + +`func (o *VlanVirtualCircuit) HasStatus() bool` + +HasStatus returns a boolean if a field has been set. ### GetTags @@ -242,6 +283,36 @@ and a boolean to check if the value has been set. SetTags sets Tags field to given value. +### HasTags + +`func (o *VlanVirtualCircuit) HasTags() bool` + +HasTags returns a boolean if a field has been set. + +### GetType + +`func (o *VlanVirtualCircuit) GetType() VlanVirtualCircuitType` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *VlanVirtualCircuit) GetTypeOk() (*VlanVirtualCircuitType, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *VlanVirtualCircuit) SetType(v VlanVirtualCircuitType)` + +SetType sets Type field to given value. + +### HasType + +`func (o *VlanVirtualCircuit) HasType() bool` + +HasType returns a boolean if a field has been set. ### GetVirtualNetwork @@ -262,6 +333,11 @@ and a boolean to check if the value has been set. SetVirtualNetwork sets VirtualNetwork field to given value. +### HasVirtualNetwork + +`func (o *VlanVirtualCircuit) HasVirtualNetwork() bool` + +HasVirtualNetwork returns a boolean if a field has been set. ### GetVnid @@ -282,6 +358,11 @@ and a boolean to check if the value has been set. SetVnid sets Vnid field to given value. +### HasVnid + +`func (o *VlanVirtualCircuit) HasVnid() bool` + +HasVnid returns a boolean if a field has been set. ### GetCreatedAt diff --git a/docs/VlanVirtualCircuitType.md b/docs/VlanVirtualCircuitType.md new file mode 100644 index 00000000..a2b854e5 --- /dev/null +++ b/docs/VlanVirtualCircuitType.md @@ -0,0 +1,11 @@ +# VlanVirtualCircuitType + +## Enum + + +* `VLAN` (value: `"vlan"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/VrfVirtualCircuit.md b/docs/VrfVirtualCircuit.md index c98e0c1f..63b022c6 100644 --- a/docs/VrfVirtualCircuit.md +++ b/docs/VrfVirtualCircuit.md @@ -18,7 +18,8 @@ Name | Type | Description | Notes **Status** | Pointer to [**VrfVirtualCircuitStatus**](VrfVirtualCircuitStatus.md) | | [optional] **Subnet** | Pointer to **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** | Pointer to **[]string** | | [optional] -**Vrf** | Pointer to [**Vrf**](Vrf.md) | | [optional] +**Type** | Pointer to [**VrfIpReservationType**](VrfIpReservationType.md) | | [optional] +**Vrf** | [**Vrf**](Vrf.md) | | **CreatedAt** | Pointer to **time.Time** | | [optional] **UpdatedAt** | Pointer to **time.Time** | | [optional] @@ -26,7 +27,7 @@ Name | Type | Description | Notes ### NewVrfVirtualCircuit -`func NewVrfVirtualCircuit() *VrfVirtualCircuit` +`func NewVrfVirtualCircuit(vrf Vrf, ) *VrfVirtualCircuit` NewVrfVirtualCircuit instantiates a new VrfVirtualCircuit object This constructor will assign default values to properties that have it defined, @@ -391,6 +392,31 @@ SetTags sets Tags field to given value. HasTags returns a boolean if a field has been set. +### GetType + +`func (o *VrfVirtualCircuit) GetType() VrfIpReservationType` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *VrfVirtualCircuit) GetTypeOk() (*VrfIpReservationType, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *VrfVirtualCircuit) SetType(v VrfIpReservationType)` + +SetType sets Type field to given value. + +### HasType + +`func (o *VrfVirtualCircuit) HasType() bool` + +HasType returns a boolean if a field has been set. + ### GetVrf `func (o *VrfVirtualCircuit) GetVrf() Vrf` @@ -410,11 +436,6 @@ and a boolean to check if the value has been set. SetVrf sets Vrf field to given value. -### HasVrf - -`func (o *VrfVirtualCircuit) HasVrf() bool` - -HasVrf returns a boolean if a field has been set. ### GetCreatedAt diff --git a/metal/v1/.openapi-generator/FILES b/metal/v1/.openapi-generator/FILES index 0bf97e6f..05343b2d 100644 --- a/metal/v1/.openapi-generator/FILES +++ b/metal/v1/.openapi-generator/FILES @@ -360,6 +360,7 @@ docs/VlanFabricVcCreateInputType.md docs/VlanVirtualCircuit.md docs/VlanVirtualCircuitCreateInput.md docs/VlanVirtualCircuitStatus.md +docs/VlanVirtualCircuitType.md docs/VlanVirtualCircuitUpdateInput.md docs/Vrf.md docs/VrfCreateInput.md @@ -660,6 +661,7 @@ model_vlan_fabric_vc_create_input_type.go model_vlan_virtual_circuit.go model_vlan_virtual_circuit_create_input.go model_vlan_virtual_circuit_status.go +model_vlan_virtual_circuit_type.go model_vlan_virtual_circuit_update_input.go model_vrf.go model_vrf_create_input.go diff --git a/metal/v1/model_vlan_virtual_circuit.go b/metal/v1/model_vlan_virtual_circuit.go index 6c2cb46a..3a10b2c8 100644 --- a/metal/v1/model_vlan_virtual_circuit.go +++ b/metal/v1/model_vlan_virtual_circuit.go @@ -22,21 +22,22 @@ var _ MappedNullable = &VlanVirtualCircuit{} // VlanVirtualCircuit struct for VlanVirtualCircuit type VlanVirtualCircuit struct { // 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. - Bill bool `json:"bill"` - Description string `json:"description"` - Id string `json:"id"` - Name string `json:"name"` - NniVlan int32 `json:"nni_vlan"` - Port Href `json:"port"` - Project Href `json:"project"` + Bill *bool `json:"bill,omitempty"` + Description *string `json:"description,omitempty"` + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + NniVlan *int32 `json:"nni_vlan,omitempty"` + Port *Href `json:"port,omitempty"` + Project *Href `json:"project,omitempty"` // 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. - Speed *int32 `json:"speed,omitempty"` - Status VlanVirtualCircuitStatus `json:"status"` - Tags []string `json:"tags"` - VirtualNetwork Href `json:"virtual_network"` - Vnid int32 `json:"vnid"` - CreatedAt *time.Time `json:"created_at,omitempty"` - UpdatedAt *time.Time `json:"updated_at,omitempty"` + Speed *int32 `json:"speed,omitempty"` + Status *VlanVirtualCircuitStatus `json:"status,omitempty"` + Tags []string `json:"tags,omitempty"` + Type *VlanVirtualCircuitType `json:"type,omitempty"` + VirtualNetwork *Href `json:"virtual_network,omitempty"` + Vnid *int32 `json:"vnid,omitempty"` + CreatedAt *time.Time `json:"created_at,omitempty"` + UpdatedAt *time.Time `json:"updated_at,omitempty"` AdditionalProperties map[string]interface{} } @@ -46,19 +47,10 @@ type _VlanVirtualCircuit VlanVirtualCircuit // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewVlanVirtualCircuit(bill bool, description string, id string, name string, nniVlan int32, port Href, project Href, status VlanVirtualCircuitStatus, tags []string, virtualNetwork Href, vnid int32) *VlanVirtualCircuit { +func NewVlanVirtualCircuit() *VlanVirtualCircuit { this := VlanVirtualCircuit{} - this.Bill = bill - this.Description = description - this.Id = id - this.Name = name - this.NniVlan = nniVlan - this.Port = port - this.Project = project - this.Status = status - this.Tags = tags - this.VirtualNetwork = virtualNetwork - this.Vnid = vnid + var bill bool = false + this.Bill = &bill return &this } @@ -68,176 +60,232 @@ func NewVlanVirtualCircuit(bill bool, description string, id string, name string func NewVlanVirtualCircuitWithDefaults() *VlanVirtualCircuit { this := VlanVirtualCircuit{} var bill bool = false - this.Bill = bill + this.Bill = &bill return &this } -// GetBill returns the Bill field value +// GetBill returns the Bill field value if set, zero value otherwise. func (o *VlanVirtualCircuit) GetBill() bool { - if o == nil { + if o == nil || IsNil(o.Bill) { var ret bool return ret } - - return o.Bill + return *o.Bill } -// GetBillOk returns a tuple with the Bill field value +// GetBillOk returns a tuple with the Bill field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *VlanVirtualCircuit) GetBillOk() (*bool, bool) { - if o == nil { + if o == nil || IsNil(o.Bill) { return nil, false } - return &o.Bill, true + return o.Bill, true +} + +// HasBill returns a boolean if a field has been set. +func (o *VlanVirtualCircuit) HasBill() bool { + if o != nil && !IsNil(o.Bill) { + return true + } + + return false } -// SetBill sets field value +// SetBill gets a reference to the given bool and assigns it to the Bill field. func (o *VlanVirtualCircuit) SetBill(v bool) { - o.Bill = v + o.Bill = &v } -// GetDescription returns the Description field value +// GetDescription returns the Description field value if set, zero value otherwise. func (o *VlanVirtualCircuit) GetDescription() string { - if o == nil { + if o == nil || IsNil(o.Description) { var ret string return ret } - - return o.Description + return *o.Description } -// GetDescriptionOk returns a tuple with the Description field value +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *VlanVirtualCircuit) GetDescriptionOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.Description) { return nil, false } - return &o.Description, true + return o.Description, true } -// SetDescription sets field value +// HasDescription returns a boolean if a field has been set. +func (o *VlanVirtualCircuit) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. func (o *VlanVirtualCircuit) SetDescription(v string) { - o.Description = v + o.Description = &v } -// GetId returns the Id field value +// GetId returns the Id field value if set, zero value otherwise. func (o *VlanVirtualCircuit) GetId() string { - if o == nil { + if o == nil || IsNil(o.Id) { var ret string return ret } - - return o.Id + return *o.Id } -// GetIdOk returns a tuple with the Id field value +// GetIdOk returns a tuple with the Id field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *VlanVirtualCircuit) GetIdOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.Id) { return nil, false } - return &o.Id, true + return o.Id, true } -// SetId sets field value +// HasId returns a boolean if a field has been set. +func (o *VlanVirtualCircuit) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. func (o *VlanVirtualCircuit) SetId(v string) { - o.Id = v + o.Id = &v } -// GetName returns the Name field value +// GetName returns the Name field value if set, zero value otherwise. func (o *VlanVirtualCircuit) GetName() string { - if o == nil { + if o == nil || IsNil(o.Name) { var ret string return ret } - - return o.Name + return *o.Name } -// GetNameOk returns a tuple with the Name field value +// GetNameOk returns a tuple with the Name field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *VlanVirtualCircuit) GetNameOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.Name) { return nil, false } - return &o.Name, true + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *VlanVirtualCircuit) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false } -// SetName sets field value +// SetName gets a reference to the given string and assigns it to the Name field. func (o *VlanVirtualCircuit) SetName(v string) { - o.Name = v + o.Name = &v } -// GetNniVlan returns the NniVlan field value +// GetNniVlan returns the NniVlan field value if set, zero value otherwise. func (o *VlanVirtualCircuit) GetNniVlan() int32 { - if o == nil { + if o == nil || IsNil(o.NniVlan) { var ret int32 return ret } - - return o.NniVlan + return *o.NniVlan } -// GetNniVlanOk returns a tuple with the NniVlan field value +// GetNniVlanOk returns a tuple with the NniVlan field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *VlanVirtualCircuit) GetNniVlanOk() (*int32, bool) { - if o == nil { + if o == nil || IsNil(o.NniVlan) { return nil, false } - return &o.NniVlan, true + return o.NniVlan, true +} + +// HasNniVlan returns a boolean if a field has been set. +func (o *VlanVirtualCircuit) HasNniVlan() bool { + if o != nil && !IsNil(o.NniVlan) { + return true + } + + return false } -// SetNniVlan sets field value +// SetNniVlan gets a reference to the given int32 and assigns it to the NniVlan field. func (o *VlanVirtualCircuit) SetNniVlan(v int32) { - o.NniVlan = v + o.NniVlan = &v } -// GetPort returns the Port field value +// GetPort returns the Port field value if set, zero value otherwise. func (o *VlanVirtualCircuit) GetPort() Href { - if o == nil { + if o == nil || IsNil(o.Port) { var ret Href return ret } - - return o.Port + return *o.Port } -// GetPortOk returns a tuple with the Port field value +// GetPortOk returns a tuple with the Port field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *VlanVirtualCircuit) GetPortOk() (*Href, bool) { - if o == nil { + if o == nil || IsNil(o.Port) { return nil, false } - return &o.Port, true + return o.Port, true } -// SetPort sets field value +// HasPort returns a boolean if a field has been set. +func (o *VlanVirtualCircuit) HasPort() bool { + if o != nil && !IsNil(o.Port) { + return true + } + + return false +} + +// SetPort gets a reference to the given Href and assigns it to the Port field. func (o *VlanVirtualCircuit) SetPort(v Href) { - o.Port = v + o.Port = &v } -// GetProject returns the Project field value +// GetProject returns the Project field value if set, zero value otherwise. func (o *VlanVirtualCircuit) GetProject() Href { - if o == nil { + if o == nil || IsNil(o.Project) { var ret Href return ret } - - return o.Project + return *o.Project } -// GetProjectOk returns a tuple with the Project field value +// GetProjectOk returns a tuple with the Project field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *VlanVirtualCircuit) GetProjectOk() (*Href, bool) { - if o == nil { + if o == nil || IsNil(o.Project) { return nil, false } - return &o.Project, true + return o.Project, true } -// SetProject sets field value +// HasProject returns a boolean if a field has been set. +func (o *VlanVirtualCircuit) HasProject() bool { + if o != nil && !IsNil(o.Project) { + return true + } + + return false +} + +// SetProject gets a reference to the given Href and assigns it to the Project field. func (o *VlanVirtualCircuit) SetProject(v Href) { - o.Project = v + o.Project = &v } // GetSpeed returns the Speed field value if set, zero value otherwise. @@ -272,100 +320,164 @@ func (o *VlanVirtualCircuit) SetSpeed(v int32) { o.Speed = &v } -// GetStatus returns the Status field value +// GetStatus returns the Status field value if set, zero value otherwise. func (o *VlanVirtualCircuit) GetStatus() VlanVirtualCircuitStatus { - if o == nil { + if o == nil || IsNil(o.Status) { var ret VlanVirtualCircuitStatus return ret } - - return o.Status + return *o.Status } -// GetStatusOk returns a tuple with the Status field value +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *VlanVirtualCircuit) GetStatusOk() (*VlanVirtualCircuitStatus, bool) { - if o == nil { + if o == nil || IsNil(o.Status) { return nil, false } - return &o.Status, true + return o.Status, true } -// SetStatus sets field value +// HasStatus returns a boolean if a field has been set. +func (o *VlanVirtualCircuit) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given VlanVirtualCircuitStatus and assigns it to the Status field. func (o *VlanVirtualCircuit) SetStatus(v VlanVirtualCircuitStatus) { - o.Status = v + o.Status = &v } -// GetTags returns the Tags field value +// GetTags returns the Tags field value if set, zero value otherwise. func (o *VlanVirtualCircuit) GetTags() []string { - if o == nil { + if o == nil || IsNil(o.Tags) { var ret []string return ret } - return o.Tags } -// GetTagsOk returns a tuple with the Tags field value +// GetTagsOk returns a tuple with the Tags field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *VlanVirtualCircuit) GetTagsOk() ([]string, bool) { - if o == nil { + if o == nil || IsNil(o.Tags) { return nil, false } return o.Tags, true } -// SetTags sets field value +// HasTags returns a boolean if a field has been set. +func (o *VlanVirtualCircuit) HasTags() bool { + if o != nil && !IsNil(o.Tags) { + return true + } + + return false +} + +// SetTags gets a reference to the given []string and assigns it to the Tags field. func (o *VlanVirtualCircuit) SetTags(v []string) { o.Tags = v } -// GetVirtualNetwork returns the VirtualNetwork field value +// GetType returns the Type field value if set, zero value otherwise. +func (o *VlanVirtualCircuit) GetType() VlanVirtualCircuitType { + if o == nil || IsNil(o.Type) { + var ret VlanVirtualCircuitType + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VlanVirtualCircuit) GetTypeOk() (*VlanVirtualCircuitType, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *VlanVirtualCircuit) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given VlanVirtualCircuitType and assigns it to the Type field. +func (o *VlanVirtualCircuit) SetType(v VlanVirtualCircuitType) { + o.Type = &v +} + +// GetVirtualNetwork returns the VirtualNetwork field value if set, zero value otherwise. func (o *VlanVirtualCircuit) GetVirtualNetwork() Href { - if o == nil { + if o == nil || IsNil(o.VirtualNetwork) { var ret Href return ret } - - return o.VirtualNetwork + return *o.VirtualNetwork } -// GetVirtualNetworkOk returns a tuple with the VirtualNetwork field value +// GetVirtualNetworkOk returns a tuple with the VirtualNetwork field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *VlanVirtualCircuit) GetVirtualNetworkOk() (*Href, bool) { - if o == nil { + if o == nil || IsNil(o.VirtualNetwork) { return nil, false } - return &o.VirtualNetwork, true + return o.VirtualNetwork, true +} + +// HasVirtualNetwork returns a boolean if a field has been set. +func (o *VlanVirtualCircuit) HasVirtualNetwork() bool { + if o != nil && !IsNil(o.VirtualNetwork) { + return true + } + + return false } -// SetVirtualNetwork sets field value +// SetVirtualNetwork gets a reference to the given Href and assigns it to the VirtualNetwork field. func (o *VlanVirtualCircuit) SetVirtualNetwork(v Href) { - o.VirtualNetwork = v + o.VirtualNetwork = &v } -// GetVnid returns the Vnid field value +// GetVnid returns the Vnid field value if set, zero value otherwise. func (o *VlanVirtualCircuit) GetVnid() int32 { - if o == nil { + if o == nil || IsNil(o.Vnid) { var ret int32 return ret } - - return o.Vnid + return *o.Vnid } -// GetVnidOk returns a tuple with the Vnid field value +// GetVnidOk returns a tuple with the Vnid field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *VlanVirtualCircuit) GetVnidOk() (*int32, bool) { - if o == nil { + if o == nil || IsNil(o.Vnid) { return nil, false } - return &o.Vnid, true + return o.Vnid, true +} + +// HasVnid returns a boolean if a field has been set. +func (o *VlanVirtualCircuit) HasVnid() bool { + if o != nil && !IsNil(o.Vnid) { + return true + } + + return false } -// SetVnid sets field value +// SetVnid gets a reference to the given int32 and assigns it to the Vnid field. func (o *VlanVirtualCircuit) SetVnid(v int32) { - o.Vnid = v + o.Vnid = &v } // GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. @@ -442,20 +554,45 @@ func (o VlanVirtualCircuit) MarshalJSON() ([]byte, error) { func (o VlanVirtualCircuit) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - toSerialize["bill"] = o.Bill - toSerialize["description"] = o.Description - toSerialize["id"] = o.Id - toSerialize["name"] = o.Name - toSerialize["nni_vlan"] = o.NniVlan - toSerialize["port"] = o.Port - toSerialize["project"] = o.Project + if !IsNil(o.Bill) { + toSerialize["bill"] = o.Bill + } + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.NniVlan) { + toSerialize["nni_vlan"] = o.NniVlan + } + if !IsNil(o.Port) { + toSerialize["port"] = o.Port + } + if !IsNil(o.Project) { + toSerialize["project"] = o.Project + } if !IsNil(o.Speed) { toSerialize["speed"] = o.Speed } - toSerialize["status"] = o.Status - toSerialize["tags"] = o.Tags - toSerialize["virtual_network"] = o.VirtualNetwork - toSerialize["vnid"] = o.Vnid + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + if !IsNil(o.Tags) { + toSerialize["tags"] = o.Tags + } + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !IsNil(o.VirtualNetwork) { + toSerialize["virtual_network"] = o.VirtualNetwork + } + if !IsNil(o.Vnid) { + toSerialize["vnid"] = o.Vnid + } if !IsNil(o.CreatedAt) { toSerialize["created_at"] = o.CreatedAt } @@ -494,6 +631,7 @@ func (o *VlanVirtualCircuit) UnmarshalJSON(bytes []byte) (err error) { delete(additionalProperties, "speed") delete(additionalProperties, "status") delete(additionalProperties, "tags") + delete(additionalProperties, "type") delete(additionalProperties, "virtual_network") delete(additionalProperties, "vnid") delete(additionalProperties, "created_at") diff --git a/metal/v1/model_vlan_virtual_circuit_type.go b/metal/v1/model_vlan_virtual_circuit_type.go new file mode 100644 index 00000000..6c1a1444 --- /dev/null +++ b/metal/v1/model_vlan_virtual_circuit_type.go @@ -0,0 +1,109 @@ +/* +Metal API + +# Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. + +API version: 1.0.0 +Contact: support@equinixmetal.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1 + +import ( + "encoding/json" + "fmt" +) + +// VlanVirtualCircuitType the model 'VlanVirtualCircuitType' +type VlanVirtualCircuitType string + +// List of VlanVirtualCircuit_type +const ( + VLANVIRTUALCIRCUITTYPE_VLAN VlanVirtualCircuitType = "vlan" +) + +// All allowed values of VlanVirtualCircuitType enum +var AllowedVlanVirtualCircuitTypeEnumValues = []VlanVirtualCircuitType{ + "vlan", +} + +func (v *VlanVirtualCircuitType) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := VlanVirtualCircuitType(value) + for _, existing := range AllowedVlanVirtualCircuitTypeEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid VlanVirtualCircuitType", value) +} + +// NewVlanVirtualCircuitTypeFromValue returns a pointer to a valid VlanVirtualCircuitType +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewVlanVirtualCircuitTypeFromValue(v string) (*VlanVirtualCircuitType, error) { + ev := VlanVirtualCircuitType(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for VlanVirtualCircuitType: valid values are %v", v, AllowedVlanVirtualCircuitTypeEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v VlanVirtualCircuitType) IsValid() bool { + for _, existing := range AllowedVlanVirtualCircuitTypeEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to VlanVirtualCircuit_type value +func (v VlanVirtualCircuitType) Ptr() *VlanVirtualCircuitType { + return &v +} + +type NullableVlanVirtualCircuitType struct { + value *VlanVirtualCircuitType + isSet bool +} + +func (v NullableVlanVirtualCircuitType) Get() *VlanVirtualCircuitType { + return v.value +} + +func (v *NullableVlanVirtualCircuitType) Set(val *VlanVirtualCircuitType) { + v.value = val + v.isSet = true +} + +func (v NullableVlanVirtualCircuitType) IsSet() bool { + return v.isSet +} + +func (v *NullableVlanVirtualCircuitType) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableVlanVirtualCircuitType(val *VlanVirtualCircuitType) *NullableVlanVirtualCircuitType { + return &NullableVlanVirtualCircuitType{value: val, isSet: true} +} + +func (v NullableVlanVirtualCircuitType) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableVlanVirtualCircuitType) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/metal/v1/model_vrf_virtual_circuit.go b/metal/v1/model_vrf_virtual_circuit.go index 8bec047a..3933c634 100644 --- a/metal/v1/model_vrf_virtual_circuit.go +++ b/metal/v1/model_vrf_virtual_circuit.go @@ -39,11 +39,12 @@ type VrfVirtualCircuit struct { Speed *int32 `json:"speed,omitempty"` Status *VrfVirtualCircuitStatus `json:"status,omitempty"` // 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. - Subnet *string `json:"subnet,omitempty"` - Tags []string `json:"tags,omitempty"` - Vrf *Vrf `json:"vrf,omitempty"` - CreatedAt *time.Time `json:"created_at,omitempty"` - UpdatedAt *time.Time `json:"updated_at,omitempty"` + Subnet *string `json:"subnet,omitempty"` + Tags []string `json:"tags,omitempty"` + Type *VrfIpReservationType `json:"type,omitempty"` + Vrf Vrf `json:"vrf"` + CreatedAt *time.Time `json:"created_at,omitempty"` + UpdatedAt *time.Time `json:"updated_at,omitempty"` AdditionalProperties map[string]interface{} } @@ -53,8 +54,9 @@ type _VrfVirtualCircuit VrfVirtualCircuit // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewVrfVirtualCircuit() *VrfVirtualCircuit { +func NewVrfVirtualCircuit(vrf Vrf) *VrfVirtualCircuit { this := VrfVirtualCircuit{} + this.Vrf = vrf return &this } @@ -514,36 +516,60 @@ func (o *VrfVirtualCircuit) SetTags(v []string) { o.Tags = v } -// GetVrf returns the Vrf field value if set, zero value otherwise. -func (o *VrfVirtualCircuit) GetVrf() Vrf { - if o == nil || IsNil(o.Vrf) { - var ret Vrf +// GetType returns the Type field value if set, zero value otherwise. +func (o *VrfVirtualCircuit) GetType() VrfIpReservationType { + if o == nil || IsNil(o.Type) { + var ret VrfIpReservationType return ret } - return *o.Vrf + return *o.Type } -// GetVrfOk returns a tuple with the Vrf field value if set, nil otherwise +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *VrfVirtualCircuit) GetVrfOk() (*Vrf, bool) { - if o == nil || IsNil(o.Vrf) { +func (o *VrfVirtualCircuit) GetTypeOk() (*VrfIpReservationType, bool) { + if o == nil || IsNil(o.Type) { return nil, false } - return o.Vrf, true + return o.Type, true } -// HasVrf returns a boolean if a field has been set. -func (o *VrfVirtualCircuit) HasVrf() bool { - if o != nil && !IsNil(o.Vrf) { +// HasType returns a boolean if a field has been set. +func (o *VrfVirtualCircuit) HasType() bool { + if o != nil && !IsNil(o.Type) { return true } return false } -// SetVrf gets a reference to the given Vrf and assigns it to the Vrf field. +// SetType gets a reference to the given VrfIpReservationType and assigns it to the Type field. +func (o *VrfVirtualCircuit) SetType(v VrfIpReservationType) { + o.Type = &v +} + +// GetVrf returns the Vrf field value +func (o *VrfVirtualCircuit) GetVrf() Vrf { + if o == nil { + var ret Vrf + return ret + } + + return o.Vrf +} + +// GetVrfOk returns a tuple with the Vrf field value +// and a boolean to check if the value has been set. +func (o *VrfVirtualCircuit) GetVrfOk() (*Vrf, bool) { + if o == nil { + return nil, false + } + return &o.Vrf, true +} + +// SetVrf sets field value func (o *VrfVirtualCircuit) SetVrf(v Vrf) { - o.Vrf = &v + o.Vrf = v } // GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. @@ -662,9 +688,10 @@ func (o VrfVirtualCircuit) ToMap() (map[string]interface{}, error) { if !IsNil(o.Tags) { toSerialize["tags"] = o.Tags } - if !IsNil(o.Vrf) { - toSerialize["vrf"] = o.Vrf + if !IsNil(o.Type) { + toSerialize["type"] = o.Type } + toSerialize["vrf"] = o.Vrf if !IsNil(o.CreatedAt) { toSerialize["created_at"] = o.CreatedAt } @@ -707,6 +734,7 @@ func (o *VrfVirtualCircuit) UnmarshalJSON(bytes []byte) (err error) { delete(additionalProperties, "status") delete(additionalProperties, "subnet") delete(additionalProperties, "tags") + delete(additionalProperties, "type") delete(additionalProperties, "vrf") delete(additionalProperties, "created_at") delete(additionalProperties, "updated_at") diff --git a/spec/oas3.fetched/components/schemas/VlanVirtualCircuit.yaml b/spec/oas3.fetched/components/schemas/VlanVirtualCircuit.yaml index 27f9c9ec..55324321 100644 --- a/spec/oas3.fetched/components/schemas/VlanVirtualCircuit.yaml +++ b/spec/oas3.fetched/components/schemas/VlanVirtualCircuit.yaml @@ -1,15 +1,3 @@ -required: -- bill -- description -- id -- name -- nni_vlan -- port -- project -- status -- tags -- virtual_network -- vnid properties: bill: type: boolean @@ -60,6 +48,10 @@ properties: items: type: string type: array + type: + type: string + enum: + - vlan virtual_network: $ref: './Href.yaml' vnid: diff --git a/spec/oas3.fetched/components/schemas/VrfVirtualCircuit.yaml b/spec/oas3.fetched/components/schemas/VrfVirtualCircuit.yaml index 84c9c32a..2bb47b5b 100644 --- a/spec/oas3.fetched/components/schemas/VrfVirtualCircuit.yaml +++ b/spec/oas3.fetched/components/schemas/VrfVirtualCircuit.yaml @@ -1,3 +1,5 @@ +required: +- vrf properties: customer_ip: description: >- @@ -73,6 +75,10 @@ properties: items: type: string type: array + type: + type: string + enum: + - vrf vrf: $ref: './Vrf.yaml' created_at: diff --git a/spec/oas3.patched/components/schemas/VlanVirtualCircuit.yaml b/spec/oas3.patched/components/schemas/VlanVirtualCircuit.yaml index 27f9c9ec..55324321 100644 --- a/spec/oas3.patched/components/schemas/VlanVirtualCircuit.yaml +++ b/spec/oas3.patched/components/schemas/VlanVirtualCircuit.yaml @@ -1,15 +1,3 @@ -required: -- bill -- description -- id -- name -- nni_vlan -- port -- project -- status -- tags -- virtual_network -- vnid properties: bill: type: boolean @@ -60,6 +48,10 @@ properties: items: type: string type: array + type: + type: string + enum: + - vlan virtual_network: $ref: './Href.yaml' vnid: diff --git a/spec/oas3.patched/components/schemas/VrfVirtualCircuit.yaml b/spec/oas3.patched/components/schemas/VrfVirtualCircuit.yaml index 84c9c32a..2bb47b5b 100644 --- a/spec/oas3.patched/components/schemas/VrfVirtualCircuit.yaml +++ b/spec/oas3.patched/components/schemas/VrfVirtualCircuit.yaml @@ -1,3 +1,5 @@ +required: +- vrf properties: customer_ip: description: >- @@ -73,6 +75,10 @@ properties: items: type: string type: array + type: + type: string + enum: + - vrf vrf: $ref: './Vrf.yaml' created_at: