From ab780897b33205174555878cb99f5ba7cae8b51a Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 13 Dec 2023 15:34:52 +0000 Subject: [PATCH 1/3] sync: fetch 2023-12-13 spec and apply patches --- .../components/schemas/CapacityLevelPerBaremetal.yaml | 1 + .../components/schemas/InterconnectionUpdateInput.yaml | 4 ---- .../components/schemas/VlanVirtualCircuit.yaml | 7 +++++++ .../metalv1/oas3.fetched/paths/capacity/metros.yaml | 6 ++++++ .../oas3.fetched/paths/organizations/id/devices.yaml | 5 +++++ .../metalv1/oas3.fetched/paths/projects/id/devices.yaml | 5 +++++ 6 files changed, 24 insertions(+), 4 deletions(-) diff --git a/spec/services/metalv1/oas3.fetched/components/schemas/CapacityLevelPerBaremetal.yaml b/spec/services/metalv1/oas3.fetched/components/schemas/CapacityLevelPerBaremetal.yaml index e187f6f9..c8ec393f 100644 --- a/spec/services/metalv1/oas3.fetched/components/schemas/CapacityLevelPerBaremetal.yaml +++ b/spec/services/metalv1/oas3.fetched/components/schemas/CapacityLevelPerBaremetal.yaml @@ -1,4 +1,5 @@ properties: level: type: string + available_servers: integer type: object diff --git a/spec/services/metalv1/oas3.fetched/components/schemas/InterconnectionUpdateInput.yaml b/spec/services/metalv1/oas3.fetched/components/schemas/InterconnectionUpdateInput.yaml index 75a29f7d..aac3b37d 100644 --- a/spec/services/metalv1/oas3.fetched/components/schemas/InterconnectionUpdateInput.yaml +++ b/spec/services/metalv1/oas3.fetched/components/schemas/InterconnectionUpdateInput.yaml @@ -15,10 +15,6 @@ properties: type: string name: type: string - redundancy: - description: Updating from 'redundant' to 'primary' will remove a secondary port, - while updating from 'primary' to 'redundant' will add one. - type: string tags: items: type: string diff --git a/spec/services/metalv1/oas3.fetched/components/schemas/VlanVirtualCircuit.yaml b/spec/services/metalv1/oas3.fetched/components/schemas/VlanVirtualCircuit.yaml index 55324321..fb31bbc7 100644 --- a/spec/services/metalv1/oas3.fetched/components/schemas/VlanVirtualCircuit.yaml +++ b/spec/services/metalv1/oas3.fetched/components/schemas/VlanVirtualCircuit.yaml @@ -3,6 +3,13 @@ properties: type: boolean default: false description: True if the Virtual Circuit is being billed. Currently, only Virtual Circuits of Fabric VCs (Metal Billed) will be billed. Usage will start the first time the Virtual Circuit becomes active, and will not stop until it is deleted from Metal. + bill_type: + type: string + nullable: true + description: Fabric Billed if the Virtual Circuit is billed by Fabric. Metal Billed if the Virtual Circuit is billed by Metal. Legacy Virtual Circuits will have a value of nil. + enum: + - metal_billed + - fabric_billed description: type: string id: diff --git a/spec/services/metalv1/oas3.fetched/paths/capacity/metros.yaml b/spec/services/metalv1/oas3.fetched/paths/capacity/metros.yaml index bac69d22..e763c255 100644 --- a/spec/services/metalv1/oas3.fetched/paths/capacity/metros.yaml +++ b/spec/services/metalv1/oas3.fetched/paths/capacity/metros.yaml @@ -12,18 +12,24 @@ get: am: "c2.medium.x86": level: "string" + available_servers: 25 "m2.xlarge.x86": level: "string" + available_servers: 15 da: "c2.medium.x86": level: "string" + available_servers: 26 "m2.xlarge.x86": level: "string" + available_servers: 11 dc: "c2.medium.x86": level: "string" + available_servers: 14 "m2.xlarge.x86": level: "string" + available_servers: 10 description: ok "401": content: diff --git a/spec/services/metalv1/oas3.fetched/paths/organizations/id/devices.yaml b/spec/services/metalv1/oas3.fetched/paths/organizations/id/devices.yaml index 6bced0ec..b90f70ef 100644 --- a/spec/services/metalv1/oas3.fetched/paths/organizations/id/devices.yaml +++ b/spec/services/metalv1/oas3.fetched/paths/organizations/id/devices.yaml @@ -54,6 +54,11 @@ get: name: has_termination_time schema: type: boolean + - description: Filter by MAC address + in: query + name: mac_address + schema: + type: string - $ref: '../../../components/parameters/Include.yaml' - $ref: '../../../components/parameters/Exclude.yaml' - $ref: '../../../components/parameters/Page.yaml' diff --git a/spec/services/metalv1/oas3.fetched/paths/projects/id/devices.yaml b/spec/services/metalv1/oas3.fetched/paths/projects/id/devices.yaml index fb2e85af..63e93d74 100644 --- a/spec/services/metalv1/oas3.fetched/paths/projects/id/devices.yaml +++ b/spec/services/metalv1/oas3.fetched/paths/projects/id/devices.yaml @@ -59,6 +59,11 @@ get: name: has_termination_time schema: type: boolean + - description: Filter by MAC address + in: query + name: mac_address + schema: + type: string - $ref: '../../../components/parameters/Include.yaml' - $ref: '../../../components/parameters/Exclude.yaml' - $ref: '../../../components/parameters/Page.yaml' From 084182c2c6806bbdbbf20377a2d1a9d590d0d9a4 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 13 Dec 2023 15:34:53 +0000 Subject: [PATCH 2/3] sync: patch spec with 2023-12-13 spec --- .../components/schemas/CapacityLevelPerBaremetal.yaml | 1 + .../components/schemas/InterconnectionUpdateInput.yaml | 4 ---- .../components/schemas/VlanVirtualCircuit.yaml | 7 +++++++ .../metalv1/oas3.patched/paths/capacity/metros.yaml | 6 ++++++ .../oas3.patched/paths/organizations/id/devices.yaml | 5 +++++ .../metalv1/oas3.patched/paths/projects/id/devices.yaml | 5 +++++ 6 files changed, 24 insertions(+), 4 deletions(-) diff --git a/spec/services/metalv1/oas3.patched/components/schemas/CapacityLevelPerBaremetal.yaml b/spec/services/metalv1/oas3.patched/components/schemas/CapacityLevelPerBaremetal.yaml index e187f6f9..c8ec393f 100644 --- a/spec/services/metalv1/oas3.patched/components/schemas/CapacityLevelPerBaremetal.yaml +++ b/spec/services/metalv1/oas3.patched/components/schemas/CapacityLevelPerBaremetal.yaml @@ -1,4 +1,5 @@ properties: level: type: string + available_servers: integer type: object diff --git a/spec/services/metalv1/oas3.patched/components/schemas/InterconnectionUpdateInput.yaml b/spec/services/metalv1/oas3.patched/components/schemas/InterconnectionUpdateInput.yaml index 75a29f7d..aac3b37d 100644 --- a/spec/services/metalv1/oas3.patched/components/schemas/InterconnectionUpdateInput.yaml +++ b/spec/services/metalv1/oas3.patched/components/schemas/InterconnectionUpdateInput.yaml @@ -15,10 +15,6 @@ properties: type: string name: type: string - redundancy: - description: Updating from 'redundant' to 'primary' will remove a secondary port, - while updating from 'primary' to 'redundant' will add one. - type: string tags: items: type: string diff --git a/spec/services/metalv1/oas3.patched/components/schemas/VlanVirtualCircuit.yaml b/spec/services/metalv1/oas3.patched/components/schemas/VlanVirtualCircuit.yaml index 55324321..fb31bbc7 100644 --- a/spec/services/metalv1/oas3.patched/components/schemas/VlanVirtualCircuit.yaml +++ b/spec/services/metalv1/oas3.patched/components/schemas/VlanVirtualCircuit.yaml @@ -3,6 +3,13 @@ properties: type: boolean default: false description: True if the Virtual Circuit is being billed. Currently, only Virtual Circuits of Fabric VCs (Metal Billed) will be billed. Usage will start the first time the Virtual Circuit becomes active, and will not stop until it is deleted from Metal. + bill_type: + type: string + nullable: true + description: Fabric Billed if the Virtual Circuit is billed by Fabric. Metal Billed if the Virtual Circuit is billed by Metal. Legacy Virtual Circuits will have a value of nil. + enum: + - metal_billed + - fabric_billed description: type: string id: diff --git a/spec/services/metalv1/oas3.patched/paths/capacity/metros.yaml b/spec/services/metalv1/oas3.patched/paths/capacity/metros.yaml index bac69d22..e763c255 100644 --- a/spec/services/metalv1/oas3.patched/paths/capacity/metros.yaml +++ b/spec/services/metalv1/oas3.patched/paths/capacity/metros.yaml @@ -12,18 +12,24 @@ get: am: "c2.medium.x86": level: "string" + available_servers: 25 "m2.xlarge.x86": level: "string" + available_servers: 15 da: "c2.medium.x86": level: "string" + available_servers: 26 "m2.xlarge.x86": level: "string" + available_servers: 11 dc: "c2.medium.x86": level: "string" + available_servers: 14 "m2.xlarge.x86": level: "string" + available_servers: 10 description: ok "401": content: diff --git a/spec/services/metalv1/oas3.patched/paths/organizations/id/devices.yaml b/spec/services/metalv1/oas3.patched/paths/organizations/id/devices.yaml index ce90a935..19c49891 100644 --- a/spec/services/metalv1/oas3.patched/paths/organizations/id/devices.yaml +++ b/spec/services/metalv1/oas3.patched/paths/organizations/id/devices.yaml @@ -54,6 +54,11 @@ get: name: has_termination_time schema: type: boolean + - description: Filter by MAC address + in: query + name: mac_address + schema: + type: string - $ref: '../../../components/parameters/Include.yaml' - $ref: '../../../components/parameters/Exclude.yaml' - $ref: '../../../components/parameters/Page.yaml' diff --git a/spec/services/metalv1/oas3.patched/paths/projects/id/devices.yaml b/spec/services/metalv1/oas3.patched/paths/projects/id/devices.yaml index 53a1b16d..957bf957 100644 --- a/spec/services/metalv1/oas3.patched/paths/projects/id/devices.yaml +++ b/spec/services/metalv1/oas3.patched/paths/projects/id/devices.yaml @@ -59,6 +59,11 @@ get: name: has_termination_time schema: type: boolean + - description: Filter by MAC address + in: query + name: mac_address + schema: + type: string - $ref: '../../../components/parameters/Include.yaml' - $ref: '../../../components/parameters/Exclude.yaml' - $ref: '../../../components/parameters/Page.yaml' From e91a21b7b910557d4ddc70841aa85bff72ad05e2 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 13 Dec 2023 15:35:28 +0000 Subject: [PATCH 3/3] sync: generate client with 2023-12-13 spec --- services/metalv1/README.md | 1 + services/metalv1/api_devices.go | 20 ++++ services/metalv1/docs/DevicesApi.md | 12 +- .../docs/InterconnectionUpdateInput.md | 26 ---- services/metalv1/docs/VirtualCircuit.md | 36 ++++++ services/metalv1/docs/VlanVirtualCircuit.md | 36 ++++++ .../docs/VlanVirtualCircuitBillType.md | 13 ++ .../model_interconnection_update_input.go | 48 +------- .../metalv1/model_vlan_virtual_circuit.go | 62 ++++++++-- .../model_vlan_virtual_circuit_bill_type.go | 111 ++++++++++++++++++ 10 files changed, 285 insertions(+), 80 deletions(-) create mode 100644 services/metalv1/docs/VlanVirtualCircuitBillType.md create mode 100644 services/metalv1/model_vlan_virtual_circuit_bill_type.go diff --git a/services/metalv1/README.md b/services/metalv1/README.md index d49751e8..9beadb0e 100644 --- a/services/metalv1/README.md +++ b/services/metalv1/README.md @@ -655,6 +655,7 @@ Class | Method | HTTP request | Description - [VlanFabricVcCreateInputServiceTokenType](docs/VlanFabricVcCreateInputServiceTokenType.md) - [VlanFabricVcCreateInputType](docs/VlanFabricVcCreateInputType.md) - [VlanVirtualCircuit](docs/VlanVirtualCircuit.md) + - [VlanVirtualCircuitBillType](docs/VlanVirtualCircuitBillType.md) - [VlanVirtualCircuitCreateInput](docs/VlanVirtualCircuitCreateInput.md) - [VlanVirtualCircuitStatus](docs/VlanVirtualCircuitStatus.md) - [VlanVirtualCircuitType](docs/VlanVirtualCircuitType.md) diff --git a/services/metalv1/api_devices.go b/services/metalv1/api_devices.go index 6eadedfa..0451d292 100644 --- a/services/metalv1/api_devices.go +++ b/services/metalv1/api_devices.go @@ -1952,6 +1952,7 @@ type ApiFindOrganizationDevicesRequest struct { tag *string type_ *string hasTerminationTime *bool + macAddress *string include *[]string exclude *[]string page *int32 @@ -2006,6 +2007,12 @@ func (r ApiFindOrganizationDevicesRequest) HasTerminationTime(hasTerminationTime return r } +// Filter by MAC address +func (r ApiFindOrganizationDevicesRequest) MacAddress(macAddress string) ApiFindOrganizationDevicesRequest { + r.macAddress = &macAddress + return r +} + // Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. func (r ApiFindOrganizationDevicesRequest) Include(include []string) ApiFindOrganizationDevicesRequest { r.include = &include @@ -2098,6 +2105,9 @@ func (a *DevicesApiService) FindOrganizationDevicesExecute(r ApiFindOrganization if r.hasTerminationTime != nil { parameterAddToHeaderOrQuery(localVarQueryParams, "has_termination_time", r.hasTerminationTime, "") } + if r.macAddress != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "mac_address", r.macAddress, "") + } if r.include != nil { parameterAddToHeaderOrQuery(localVarQueryParams, "include", r.include, "csv") } @@ -2248,6 +2258,7 @@ type ApiFindProjectDevicesRequest struct { tag *string type_ *string hasTerminationTime *bool + macAddress *string include *[]string exclude *[]string page *int32 @@ -2308,6 +2319,12 @@ func (r ApiFindProjectDevicesRequest) HasTerminationTime(hasTerminationTime bool return r } +// Filter by MAC address +func (r ApiFindProjectDevicesRequest) MacAddress(macAddress string) ApiFindProjectDevicesRequest { + r.macAddress = &macAddress + return r +} + // Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. func (r ApiFindProjectDevicesRequest) Include(include []string) ApiFindProjectDevicesRequest { r.include = &include @@ -2403,6 +2420,9 @@ func (a *DevicesApiService) FindProjectDevicesExecute(r ApiFindProjectDevicesReq if r.hasTerminationTime != nil { parameterAddToHeaderOrQuery(localVarQueryParams, "has_termination_time", r.hasTerminationTime, "") } + if r.macAddress != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "mac_address", r.macAddress, "") + } if r.include != nil { parameterAddToHeaderOrQuery(localVarQueryParams, "include", r.include, "csv") } diff --git a/services/metalv1/docs/DevicesApi.md b/services/metalv1/docs/DevicesApi.md index 88746c2e..eb2155b2 100644 --- a/services/metalv1/docs/DevicesApi.md +++ b/services/metalv1/docs/DevicesApi.md @@ -896,7 +896,7 @@ Name | Type | Description | Notes ## FindOrganizationDevices -> DeviceList FindOrganizationDevices(ctx, id).Search(search).Categories(categories).Facility(facility).Hostname(hostname).Reserved(reserved).Tag(tag).Type_(type_).HasTerminationTime(hasTerminationTime).Include(include).Exclude(exclude).Page(page).PerPage(perPage).Execute() +> DeviceList FindOrganizationDevices(ctx, id).Search(search).Categories(categories).Facility(facility).Hostname(hostname).Reserved(reserved).Tag(tag).Type_(type_).HasTerminationTime(hasTerminationTime).MacAddress(macAddress).Include(include).Exclude(exclude).Page(page).PerPage(perPage).Execute() Retrieve all devices of an organization @@ -925,6 +925,7 @@ func main() { tag := "tag_example" // string | Filter by device tag (optional) type_ := "type__example" // string | Filter by instance type (ondemand,spot,reserved) (optional) hasTerminationTime := true // bool | Filter only instances marked for termination. When set to true, only include instances that have a termination time. When set to false, only include instances that do not have a termination time. (optional) + macAddress := "macAddress_example" // string | Filter by MAC address (optional) include := []string{"Inner_example"} // []string | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) exclude := []string{"Inner_example"} // []string | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) page := int32(56) // int32 | Page to return (optional) (default to 1) @@ -932,7 +933,7 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DevicesApi.FindOrganizationDevices(context.Background(), id).Search(search).Categories(categories).Facility(facility).Hostname(hostname).Reserved(reserved).Tag(tag).Type_(type_).HasTerminationTime(hasTerminationTime).Include(include).Exclude(exclude).Page(page).PerPage(perPage).Execute() + resp, r, err := apiClient.DevicesApi.FindOrganizationDevices(context.Background(), id).Search(search).Categories(categories).Facility(facility).Hostname(hostname).Reserved(reserved).Tag(tag).Type_(type_).HasTerminationTime(hasTerminationTime).MacAddress(macAddress).Include(include).Exclude(exclude).Page(page).PerPage(perPage).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `DevicesApi.FindOrganizationDevices``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -966,6 +967,7 @@ Name | Type | Description | Notes **tag** | **string** | Filter by device tag | **type_** | **string** | Filter by instance type (ondemand,spot,reserved) | **hasTerminationTime** | **bool** | Filter only instances marked for termination. When set to true, only include instances that have a termination time. When set to false, only include instances that do not have a termination time. | + **macAddress** | **string** | Filter by MAC address | **include** | **[]string** | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | **exclude** | **[]string** | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. | **page** | **int32** | Page to return | [default to 1] @@ -991,7 +993,7 @@ Name | Type | Description | Notes ## FindProjectDevices -> DeviceList FindProjectDevices(ctx, id).Search(search).Categories(categories).Facility(facility).Metro(metro).Hostname(hostname).Reserved(reserved).Tag(tag).Type_(type_).HasTerminationTime(hasTerminationTime).Include(include).Exclude(exclude).Page(page).PerPage(perPage).Execute() +> DeviceList FindProjectDevices(ctx, id).Search(search).Categories(categories).Facility(facility).Metro(metro).Hostname(hostname).Reserved(reserved).Tag(tag).Type_(type_).HasTerminationTime(hasTerminationTime).MacAddress(macAddress).Include(include).Exclude(exclude).Page(page).PerPage(perPage).Execute() Retrieve all devices of a project @@ -1021,6 +1023,7 @@ func main() { tag := "tag_example" // string | Filter by device tag (optional) type_ := "type__example" // string | Filter by instance type (ondemand,spot,reserved) (optional) hasTerminationTime := true // bool | Filter only instances marked for termination. When set to true, only include instances that have a termination time. When set to false, only include instances that do not have a termination time. (optional) + macAddress := "macAddress_example" // string | Filter by MAC address (optional) include := []string{"Inner_example"} // []string | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) exclude := []string{"Inner_example"} // []string | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) page := int32(56) // int32 | Page to return (optional) (default to 1) @@ -1028,7 +1031,7 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DevicesApi.FindProjectDevices(context.Background(), id).Search(search).Categories(categories).Facility(facility).Metro(metro).Hostname(hostname).Reserved(reserved).Tag(tag).Type_(type_).HasTerminationTime(hasTerminationTime).Include(include).Exclude(exclude).Page(page).PerPage(perPage).Execute() + resp, r, err := apiClient.DevicesApi.FindProjectDevices(context.Background(), id).Search(search).Categories(categories).Facility(facility).Metro(metro).Hostname(hostname).Reserved(reserved).Tag(tag).Type_(type_).HasTerminationTime(hasTerminationTime).MacAddress(macAddress).Include(include).Exclude(exclude).Page(page).PerPage(perPage).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `DevicesApi.FindProjectDevices``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -1063,6 +1066,7 @@ Name | Type | Description | Notes **tag** | **string** | Filter by device tag | **type_** | **string** | Filter by instance type (ondemand,spot,reserved) | **hasTerminationTime** | **bool** | Filter only instances marked for termination. When set to true, only include instances that have a termination time. When set to false, only include instances that do not have a termination time. | + **macAddress** | **string** | Filter by MAC address | **include** | **[]string** | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | **exclude** | **[]string** | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. | **page** | **int32** | Page to return | [default to 1] diff --git a/services/metalv1/docs/InterconnectionUpdateInput.md b/services/metalv1/docs/InterconnectionUpdateInput.md index 8c1a59b0..df543a9a 100644 --- a/services/metalv1/docs/InterconnectionUpdateInput.md +++ b/services/metalv1/docs/InterconnectionUpdateInput.md @@ -8,7 +8,6 @@ Name | Type | Description | Notes **Description** | Pointer to **string** | | [optional] **Mode** | Pointer to [**InterconnectionMode**](InterconnectionMode.md) | | [optional] **Name** | Pointer to **string** | | [optional] -**Redundancy** | Pointer to **string** | Updating from 'redundant' to 'primary' will remove a secondary port, while updating from 'primary' to 'redundant' will add one. | [optional] **Tags** | Pointer to **[]string** | | [optional] ## Methods @@ -130,31 +129,6 @@ SetName sets Name field to given value. HasName returns a boolean if a field has been set. -### GetRedundancy - -`func (o *InterconnectionUpdateInput) GetRedundancy() string` - -GetRedundancy returns the Redundancy field if non-nil, zero value otherwise. - -### GetRedundancyOk - -`func (o *InterconnectionUpdateInput) GetRedundancyOk() (*string, bool)` - -GetRedundancyOk returns a tuple with the Redundancy field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetRedundancy - -`func (o *InterconnectionUpdateInput) SetRedundancy(v string)` - -SetRedundancy sets Redundancy field to given value. - -### HasRedundancy - -`func (o *InterconnectionUpdateInput) HasRedundancy() bool` - -HasRedundancy returns a boolean if a field has been set. - ### GetTags `func (o *InterconnectionUpdateInput) GetTags() []string` diff --git a/services/metalv1/docs/VirtualCircuit.md b/services/metalv1/docs/VirtualCircuit.md index 81e3739f..0a2de80c 100644 --- a/services/metalv1/docs/VirtualCircuit.md +++ b/services/metalv1/docs/VirtualCircuit.md @@ -5,6 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **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] +**BillType** | Pointer to [**NullableVlanVirtualCircuitBillType**](VlanVirtualCircuitBillType.md) | | [optional] **Description** | Pointer to **string** | | [optional] **Id** | Pointer to **string** | | [optional] **Name** | Pointer to **string** | | [optional] @@ -70,6 +71,41 @@ SetBill sets Bill field to given value. HasBill returns a boolean if a field has been set. +### GetBillType + +`func (o *VirtualCircuit) GetBillType() VlanVirtualCircuitBillType` + +GetBillType returns the BillType field if non-nil, zero value otherwise. + +### GetBillTypeOk + +`func (o *VirtualCircuit) GetBillTypeOk() (*VlanVirtualCircuitBillType, bool)` + +GetBillTypeOk returns a tuple with the BillType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBillType + +`func (o *VirtualCircuit) SetBillType(v VlanVirtualCircuitBillType)` + +SetBillType sets BillType field to given value. + +### HasBillType + +`func (o *VirtualCircuit) HasBillType() bool` + +HasBillType returns a boolean if a field has been set. + +### SetBillTypeNil + +`func (o *VirtualCircuit) SetBillTypeNil(b bool)` + + SetBillTypeNil sets the value for BillType to be an explicit nil + +### UnsetBillType +`func (o *VirtualCircuit) UnsetBillType()` + +UnsetBillType ensures that no value is present for BillType, not even an explicit nil ### GetDescription `func (o *VirtualCircuit) GetDescription() string` diff --git a/services/metalv1/docs/VlanVirtualCircuit.md b/services/metalv1/docs/VlanVirtualCircuit.md index 8ce8820f..fbccd1da 100644 --- a/services/metalv1/docs/VlanVirtualCircuit.md +++ b/services/metalv1/docs/VlanVirtualCircuit.md @@ -5,6 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **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] +**BillType** | Pointer to [**NullableVlanVirtualCircuitBillType**](VlanVirtualCircuitBillType.md) | | [optional] **Description** | Pointer to **string** | | [optional] **Id** | Pointer to **string** | | [optional] **Name** | Pointer to **string** | | [optional] @@ -64,6 +65,41 @@ SetBill sets Bill field to given value. HasBill returns a boolean if a field has been set. +### GetBillType + +`func (o *VlanVirtualCircuit) GetBillType() VlanVirtualCircuitBillType` + +GetBillType returns the BillType field if non-nil, zero value otherwise. + +### GetBillTypeOk + +`func (o *VlanVirtualCircuit) GetBillTypeOk() (*VlanVirtualCircuitBillType, bool)` + +GetBillTypeOk returns a tuple with the BillType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBillType + +`func (o *VlanVirtualCircuit) SetBillType(v VlanVirtualCircuitBillType)` + +SetBillType sets BillType field to given value. + +### HasBillType + +`func (o *VlanVirtualCircuit) HasBillType() bool` + +HasBillType returns a boolean if a field has been set. + +### SetBillTypeNil + +`func (o *VlanVirtualCircuit) SetBillTypeNil(b bool)` + + SetBillTypeNil sets the value for BillType to be an explicit nil + +### UnsetBillType +`func (o *VlanVirtualCircuit) UnsetBillType()` + +UnsetBillType ensures that no value is present for BillType, not even an explicit nil ### GetDescription `func (o *VlanVirtualCircuit) GetDescription() string` diff --git a/services/metalv1/docs/VlanVirtualCircuitBillType.md b/services/metalv1/docs/VlanVirtualCircuitBillType.md new file mode 100644 index 00000000..f0a6edc5 --- /dev/null +++ b/services/metalv1/docs/VlanVirtualCircuitBillType.md @@ -0,0 +1,13 @@ +# VlanVirtualCircuitBillType + +## Enum + + +* `METAL_BILLED` (value: `"metal_billed"`) + +* `FABRIC_BILLED` (value: `"fabric_billed"`) + + +[[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/services/metalv1/model_interconnection_update_input.go b/services/metalv1/model_interconnection_update_input.go index 29a00992..44de0b77 100644 --- a/services/metalv1/model_interconnection_update_input.go +++ b/services/metalv1/model_interconnection_update_input.go @@ -20,13 +20,11 @@ var _ MappedNullable = &InterconnectionUpdateInput{} // InterconnectionUpdateInput struct for InterconnectionUpdateInput type InterconnectionUpdateInput struct { - ContactEmail *string `json:"contact_email,omitempty"` - Description *string `json:"description,omitempty"` - Mode *InterconnectionMode `json:"mode,omitempty"` - Name *string `json:"name,omitempty"` - // Updating from 'redundant' to 'primary' will remove a secondary port, while updating from 'primary' to 'redundant' will add one. - Redundancy *string `json:"redundancy,omitempty"` - Tags []string `json:"tags,omitempty"` + ContactEmail *string `json:"contact_email,omitempty"` + Description *string `json:"description,omitempty"` + Mode *InterconnectionMode `json:"mode,omitempty"` + Name *string `json:"name,omitempty"` + Tags []string `json:"tags,omitempty"` AdditionalProperties map[string]interface{} } @@ -177,38 +175,6 @@ func (o *InterconnectionUpdateInput) SetName(v string) { o.Name = &v } -// GetRedundancy returns the Redundancy field value if set, zero value otherwise. -func (o *InterconnectionUpdateInput) GetRedundancy() string { - if o == nil || IsNil(o.Redundancy) { - var ret string - return ret - } - return *o.Redundancy -} - -// GetRedundancyOk returns a tuple with the Redundancy field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *InterconnectionUpdateInput) GetRedundancyOk() (*string, bool) { - if o == nil || IsNil(o.Redundancy) { - return nil, false - } - return o.Redundancy, true -} - -// HasRedundancy returns a boolean if a field has been set. -func (o *InterconnectionUpdateInput) HasRedundancy() bool { - if o != nil && !IsNil(o.Redundancy) { - return true - } - - return false -} - -// SetRedundancy gets a reference to the given string and assigns it to the Redundancy field. -func (o *InterconnectionUpdateInput) SetRedundancy(v string) { - o.Redundancy = &v -} - // GetTags returns the Tags field value if set, zero value otherwise. func (o *InterconnectionUpdateInput) GetTags() []string { if o == nil || IsNil(o.Tags) { @@ -263,9 +229,6 @@ func (o InterconnectionUpdateInput) ToMap() (map[string]interface{}, error) { if !IsNil(o.Name) { toSerialize["name"] = o.Name } - if !IsNil(o.Redundancy) { - toSerialize["redundancy"] = o.Redundancy - } if !IsNil(o.Tags) { toSerialize["tags"] = o.Tags } @@ -295,7 +258,6 @@ func (o *InterconnectionUpdateInput) UnmarshalJSON(bytes []byte) (err error) { delete(additionalProperties, "description") delete(additionalProperties, "mode") delete(additionalProperties, "name") - delete(additionalProperties, "redundancy") delete(additionalProperties, "tags") o.AdditionalProperties = additionalProperties } diff --git a/services/metalv1/model_vlan_virtual_circuit.go b/services/metalv1/model_vlan_virtual_circuit.go index 065efdb8..00bee92f 100644 --- a/services/metalv1/model_vlan_virtual_circuit.go +++ b/services/metalv1/model_vlan_virtual_circuit.go @@ -22,13 +22,14 @@ 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,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"` + Bill *bool `json:"bill,omitempty"` + BillType NullableVlanVirtualCircuitBillType `json:"bill_type,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,omitempty"` @@ -96,6 +97,49 @@ func (o *VlanVirtualCircuit) SetBill(v bool) { o.Bill = &v } +// GetBillType returns the BillType field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *VlanVirtualCircuit) GetBillType() VlanVirtualCircuitBillType { + if o == nil || IsNil(o.BillType.Get()) { + var ret VlanVirtualCircuitBillType + return ret + } + return *o.BillType.Get() +} + +// GetBillTypeOk returns a tuple with the BillType field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *VlanVirtualCircuit) GetBillTypeOk() (*VlanVirtualCircuitBillType, bool) { + if o == nil { + return nil, false + } + return o.BillType.Get(), o.BillType.IsSet() +} + +// HasBillType returns a boolean if a field has been set. +func (o *VlanVirtualCircuit) HasBillType() bool { + if o != nil && o.BillType.IsSet() { + return true + } + + return false +} + +// SetBillType gets a reference to the given NullableVlanVirtualCircuitBillType and assigns it to the BillType field. +func (o *VlanVirtualCircuit) SetBillType(v VlanVirtualCircuitBillType) { + o.BillType.Set(&v) +} + +// SetBillTypeNil sets the value for BillType to be an explicit nil +func (o *VlanVirtualCircuit) SetBillTypeNil() { + o.BillType.Set(nil) +} + +// UnsetBillType ensures that no value is present for BillType, not even an explicit nil +func (o *VlanVirtualCircuit) UnsetBillType() { + o.BillType.Unset() +} + // GetDescription returns the Description field value if set, zero value otherwise. func (o *VlanVirtualCircuit) GetDescription() string { if o == nil || IsNil(o.Description) { @@ -557,6 +601,9 @@ func (o VlanVirtualCircuit) ToMap() (map[string]interface{}, error) { if !IsNil(o.Bill) { toSerialize["bill"] = o.Bill } + if o.BillType.IsSet() { + toSerialize["bill_type"] = o.BillType.Get() + } if !IsNil(o.Description) { toSerialize["description"] = o.Description } @@ -622,6 +669,7 @@ func (o *VlanVirtualCircuit) UnmarshalJSON(bytes []byte) (err error) { if err = json.Unmarshal(bytes, &additionalProperties); err == nil { delete(additionalProperties, "bill") + delete(additionalProperties, "bill_type") delete(additionalProperties, "description") delete(additionalProperties, "id") delete(additionalProperties, "name") diff --git a/services/metalv1/model_vlan_virtual_circuit_bill_type.go b/services/metalv1/model_vlan_virtual_circuit_bill_type.go new file mode 100644 index 00000000..c0a5ffaf --- /dev/null +++ b/services/metalv1/model_vlan_virtual_circuit_bill_type.go @@ -0,0 +1,111 @@ +/* +Metal API + +# Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `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 metalv1 + +import ( + "encoding/json" + "fmt" +) + +// VlanVirtualCircuitBillType Fabric Billed if the Virtual Circuit is billed by Fabric. Metal Billed if the Virtual Circuit is billed by Metal. Legacy Virtual Circuits will have a value of nil. +type VlanVirtualCircuitBillType string + +// List of VlanVirtualCircuit_bill_type +const ( + VLANVIRTUALCIRCUITBILLTYPE_METAL_BILLED VlanVirtualCircuitBillType = "metal_billed" + VLANVIRTUALCIRCUITBILLTYPE_FABRIC_BILLED VlanVirtualCircuitBillType = "fabric_billed" +) + +// All allowed values of VlanVirtualCircuitBillType enum +var AllowedVlanVirtualCircuitBillTypeEnumValues = []VlanVirtualCircuitBillType{ + "metal_billed", + "fabric_billed", +} + +func (v *VlanVirtualCircuitBillType) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := VlanVirtualCircuitBillType(value) + for _, existing := range AllowedVlanVirtualCircuitBillTypeEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid VlanVirtualCircuitBillType", value) +} + +// NewVlanVirtualCircuitBillTypeFromValue returns a pointer to a valid VlanVirtualCircuitBillType +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewVlanVirtualCircuitBillTypeFromValue(v string) (*VlanVirtualCircuitBillType, error) { + ev := VlanVirtualCircuitBillType(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for VlanVirtualCircuitBillType: valid values are %v", v, AllowedVlanVirtualCircuitBillTypeEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v VlanVirtualCircuitBillType) IsValid() bool { + for _, existing := range AllowedVlanVirtualCircuitBillTypeEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to VlanVirtualCircuit_bill_type value +func (v VlanVirtualCircuitBillType) Ptr() *VlanVirtualCircuitBillType { + return &v +} + +type NullableVlanVirtualCircuitBillType struct { + value *VlanVirtualCircuitBillType + isSet bool +} + +func (v NullableVlanVirtualCircuitBillType) Get() *VlanVirtualCircuitBillType { + return v.value +} + +func (v *NullableVlanVirtualCircuitBillType) Set(val *VlanVirtualCircuitBillType) { + v.value = val + v.isSet = true +} + +func (v NullableVlanVirtualCircuitBillType) IsSet() bool { + return v.isSet +} + +func (v *NullableVlanVirtualCircuitBillType) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableVlanVirtualCircuitBillType(val *VlanVirtualCircuitBillType) *NullableVlanVirtualCircuitBillType { + return &NullableVlanVirtualCircuitBillType{value: val, isSet: true} +} + +func (v NullableVlanVirtualCircuitBillType) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableVlanVirtualCircuitBillType) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +}