From 96a32ef4f4bc40940950ebd8cadc9f2ecfa99f5e Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 19 Dec 2024 21:13:20 +0000 Subject: [PATCH 1/3] sync: fetch 2024-12-19 spec and apply patches --- .../schemas/DedicatedPortCreateInput.yaml | 3 - .../schemas/InstancesBatchCreateInput.yaml | 4 +- .../components/schemas/Interconnection.yaml | 3 - .../components/schemas/Invitation.yaml | 6 ++ .../components/schemas/InvitationInput.yaml | 6 ++ .../components/schemas/Member.yaml | 32 ++++++ .../components/schemas/MemberList.yaml | 6 ++ .../components/schemas/MemberUpdateInput.yaml | 25 +++++ .../components/schemas/Membership.yaml | 4 + .../components/schemas/MetroInput.yaml | 11 +- .../components/schemas/OperatingSystem.yaml | 22 ++-- .../components/schemas/Project.yaml | 3 +- .../schemas/ProjectCreateFromRootInput.yaml | 2 - .../schemas/ProjectCreateInput.yaml | 2 - .../oas3.fetched/components/schemas/Role.yaml | 9 ++ .../components/schemas/RoleList.yaml | 10 ++ .../components/schemas/ServerInfo.yaml | 3 - .../schemas/SpotMarketRequestCreateInput.yaml | 6 -- .../schemas/VirtualNetworkCreateInput.yaml | 5 - .../schemas/VlanFabricVcCreateInput.yaml | 3 - .../schemas/VrfFabricVcCreateInput.yaml | 3 - .../metalv1/oas3.fetched/openapi3.yaml | 31 ++++-- .../metalv1/oas3.fetched/paths/capacity.yaml | 33 ------ .../oas3.fetched/paths/facilities.yaml | 50 --------- .../oas3.fetched/paths/operating-systems.yaml | 2 +- .../oas3.fetched/paths/organizations.yaml | 41 ------- .../paths/organizations/id/capacity.yaml | 50 --------- .../paths/organizations/id/devices.yaml | 1 - .../paths/organizations/id/roles.yaml | 33 ++++++ .../paths/organizations/id/roles/role_id.yaml | 39 +++++++ .../organization_id/connections.yaml | 10 +- .../members.yaml} | 16 ++- .../organization_id/members/id.yaml | 100 ++++++++++++++++++ .../metalv1/oas3.fetched/paths/plans.yaml | 1 - .../paths/projects/id/devices.yaml | 5 +- .../paths/projects/id/facilities.yaml | 42 -------- .../paths/projects/id/virtual-networks.yaml | 6 -- .../projects/project_id/connections.yaml | 4 +- .../project_id/self-service/reservations.yaml | 1 - 39 files changed, 331 insertions(+), 302 deletions(-) create mode 100644 spec/services/metalv1/oas3.fetched/components/schemas/Member.yaml create mode 100644 spec/services/metalv1/oas3.fetched/components/schemas/MemberList.yaml create mode 100644 spec/services/metalv1/oas3.fetched/components/schemas/MemberUpdateInput.yaml create mode 100644 spec/services/metalv1/oas3.fetched/components/schemas/Role.yaml create mode 100644 spec/services/metalv1/oas3.fetched/components/schemas/RoleList.yaml delete mode 100644 spec/services/metalv1/oas3.fetched/paths/facilities.yaml delete mode 100644 spec/services/metalv1/oas3.fetched/paths/organizations/id/capacity.yaml create mode 100644 spec/services/metalv1/oas3.fetched/paths/organizations/id/roles.yaml create mode 100644 spec/services/metalv1/oas3.fetched/paths/organizations/id/roles/role_id.yaml rename spec/services/metalv1/oas3.fetched/paths/organizations/{id/facilities.yaml => organization_id/members.yaml} (68%) create mode 100644 spec/services/metalv1/oas3.fetched/paths/organizations/organization_id/members/id.yaml delete mode 100644 spec/services/metalv1/oas3.fetched/paths/projects/id/facilities.yaml diff --git a/spec/services/metalv1/oas3.fetched/components/schemas/DedicatedPortCreateInput.yaml b/spec/services/metalv1/oas3.fetched/components/schemas/DedicatedPortCreateInput.yaml index c8ad3aff..44fdaf3d 100644 --- a/spec/services/metalv1/oas3.fetched/components/schemas/DedicatedPortCreateInput.yaml +++ b/spec/services/metalv1/oas3.fetched/components/schemas/DedicatedPortCreateInput.yaml @@ -8,9 +8,6 @@ properties: format: email description: type: string - facility_id: - type: string - x-deprecated: true metro: description: A Metro ID or code. For interconnections with Dedicated Ports, this will be the location of the issued Dedicated Ports. type: string diff --git a/spec/services/metalv1/oas3.fetched/components/schemas/InstancesBatchCreateInput.yaml b/spec/services/metalv1/oas3.fetched/components/schemas/InstancesBatchCreateInput.yaml index 97c166be..fd5b13d6 100644 --- a/spec/services/metalv1/oas3.fetched/components/schemas/InstancesBatchCreateInput.yaml +++ b/spec/services/metalv1/oas3.fetched/components/schemas/InstancesBatchCreateInput.yaml @@ -10,9 +10,7 @@ properties: quantity: type: integer description: The number of devices to create in this batch. The hostname may contain an `{{index}}` placeholder, which will be replaced with the index of the device in the batch. For example, if the hostname is `device-{{index}}`, the first device in the batch will have the hostname `device-01`, the second device will have the hostname `device-02`, and so on. - - oneOf: - - $ref: 'DeviceCreateInMetroInput.yaml' - - $ref: 'DeviceCreateInFacilityInput.yaml' + - $ref: 'DeviceCreateInMetroInput.yaml' type: array type: object diff --git a/spec/services/metalv1/oas3.fetched/components/schemas/Interconnection.yaml b/spec/services/metalv1/oas3.fetched/components/schemas/Interconnection.yaml index 318dc74f..3cbb4628 100644 --- a/spec/services/metalv1/oas3.fetched/components/schemas/Interconnection.yaml +++ b/spec/services/metalv1/oas3.fetched/components/schemas/Interconnection.yaml @@ -3,9 +3,6 @@ properties: type: string description: type: string - facility: - $ref: './Facility.yaml' - x-deprecated: true id: format: uuid type: string diff --git a/spec/services/metalv1/oas3.fetched/components/schemas/Invitation.yaml b/spec/services/metalv1/oas3.fetched/components/schemas/Invitation.yaml index fb587f0f..74ab6019 100644 --- a/spec/services/metalv1/oas3.fetched/components/schemas/Invitation.yaml +++ b/spec/services/metalv1/oas3.fetched/components/schemas/Invitation.yaml @@ -34,4 +34,10 @@ properties: updated_at: format: date-time type: string + bound_roles: + type: array + items: + type: string + example: + - "permrv2-:id" type: object diff --git a/spec/services/metalv1/oas3.fetched/components/schemas/InvitationInput.yaml b/spec/services/metalv1/oas3.fetched/components/schemas/InvitationInput.yaml index 3461ddcb..39ba8b03 100644 --- a/spec/services/metalv1/oas3.fetched/components/schemas/InvitationInput.yaml +++ b/spec/services/metalv1/oas3.fetched/components/schemas/InvitationInput.yaml @@ -21,6 +21,12 @@ properties: - collaborator - limited_collaborator type: array + bound_roles: + type: array + items: + type: string + example: + - "permrv2-:id" required: - invitee type: object diff --git a/spec/services/metalv1/oas3.fetched/components/schemas/Member.yaml b/spec/services/metalv1/oas3.fetched/components/schemas/Member.yaml new file mode 100644 index 00000000..49f634c8 --- /dev/null +++ b/spec/services/metalv1/oas3.fetched/components/schemas/Member.yaml @@ -0,0 +1,32 @@ +properties: + id: + format: uuid + type: string + roles: + type: array + items: + type: string + enum: + - admin + - billing + - collaborator + - limited_collaborator + projects_count: + type: integer + bound_roles: + type: array + items: + type: string + example: + - "permrv2-:id" + user: + $ref: './Href.yaml' + organization: + $ref: './Href.yaml' + projects: + type: array + items: + type: object + $ref: './Href.yaml' + href: + type: "string" diff --git a/spec/services/metalv1/oas3.fetched/components/schemas/MemberList.yaml b/spec/services/metalv1/oas3.fetched/components/schemas/MemberList.yaml new file mode 100644 index 00000000..19cdfe42 --- /dev/null +++ b/spec/services/metalv1/oas3.fetched/components/schemas/MemberList.yaml @@ -0,0 +1,6 @@ +properties: + members: + items: + $ref: './Member.yaml' + type: array +type: object diff --git a/spec/services/metalv1/oas3.fetched/components/schemas/MemberUpdateInput.yaml b/spec/services/metalv1/oas3.fetched/components/schemas/MemberUpdateInput.yaml new file mode 100644 index 00000000..0ba1adb3 --- /dev/null +++ b/spec/services/metalv1/oas3.fetched/components/schemas/MemberUpdateInput.yaml @@ -0,0 +1,25 @@ +properties: + role: + description: Primary role for the user within the organization + type: array + items: + type: string + enum: + - admin + - billing + - collaborator + - limited_collaborator + bound_roles: + type: array + description: Additional roles that can be bound to the user to grant extra permissions. + items: + type: string + example: + - "permrv2-:id" + project_ids: + description: Project IDs the user should be able to access. This field is only required when role is set to `collaborator` or `limited_collaborator`. + type: array + items: + type: string + format: uuid +type: object diff --git a/spec/services/metalv1/oas3.fetched/components/schemas/Membership.yaml b/spec/services/metalv1/oas3.fetched/components/schemas/Membership.yaml index 9adde1ac..fdd50e97 100644 --- a/spec/services/metalv1/oas3.fetched/components/schemas/Membership.yaml +++ b/spec/services/metalv1/oas3.fetched/components/schemas/Membership.yaml @@ -18,4 +18,8 @@ properties: type: string user: $ref: './Href.yaml' + bound_roles: + type: array + items: + type: string type: object diff --git a/spec/services/metalv1/oas3.fetched/components/schemas/MetroInput.yaml b/spec/services/metalv1/oas3.fetched/components/schemas/MetroInput.yaml index 5cd1b9d5..d4f8d69e 100644 --- a/spec/services/metalv1/oas3.fetched/components/schemas/MetroInput.yaml +++ b/spec/services/metalv1/oas3.fetched/components/schemas/MetroInput.yaml @@ -6,6 +6,13 @@ properties: Metro code or ID of where the device should be provisioned in, or it can be instructed to create the device in the best available metro with `{ "metro": "any" }`. The special metro value of any means anywhere, any metro. When any is chosen in the request, the metro location is picked per our scheduling algorithms that favor the following factors: hardware reservation location (if requesting reserved hardware), ip reservations, spot instances, etc. The any keyword *does not* optimize for cost, this means that usage costs (instance, transfer, other features dependent on location) will vary. Please check metro value in response to see where the device was created. + + Additionally it is possible to set a prioritized location selection. For example `{ "metro": ["m3", "m2", "any"] }` can be used to prioritize `m3` and then `m2` before accepting `any` metro. If none of the metros provided have availability for the requested device the request will fail. Either metro or facility must be provided. - type: string - example: sv \ No newline at end of file + anyOf: + - type: array + items: + type: string + example: [ "sv", "any"] + - type: string + example: sv \ No newline at end of file diff --git a/spec/services/metalv1/oas3.fetched/components/schemas/OperatingSystem.yaml b/spec/services/metalv1/oas3.fetched/components/schemas/OperatingSystem.yaml index b1171edf..81e4f5ae 100644 --- a/spec/services/metalv1/oas3.fetched/components/schemas/OperatingSystem.yaml +++ b/spec/services/metalv1/oas3.fetched/components/schemas/OperatingSystem.yaml @@ -1,10 +1,10 @@ properties: build_date: - description: The date on which the current OS image was build and released + description: The date when Metal's current OS image was built and released. type: string format: date deprecation_date: - description: The date when the OS is deprecated + description: The date when the OS is deprecated. This is the date set by the upstream operating system maintainer. type: string format: date distro: @@ -12,43 +12,43 @@ properties: distro_label: type: string end_of_life_date: - description: The OS no longer receives any updates and may be disabled at any time + description: The date when the Metal OS image no longer receives any updates and may be disabled at any time. Typically the same as the deprecation date set by the upstream OS maintainers. type: string format: date end_of_service_date: - description: When the OS is nearing end of life, typically 30 days before end of life + description: Metal-set date for when the OS is nearing end of life, typically 30 days before end of life. type: string format: date id: format: uuid type: string licensed: - description: Licenced OS is priced according to pricing property + description: Indicates if the OS is licensed or not. Licensed operating systems are priced according to pricing property. type: boolean lifecycle_state: - description: Where in the support lifecycle the OS is + description: Where in the lifecycle the OS image is. Possible states are - `"testing"`, `"pre_release"`, `"active"`, `"deprecated"`, `"end_of_service"`, or `"end_of_life"`. type: string name: type: string preinstallable: - description: Servers can be already preinstalled with OS in order to shorten provision + description: Indicates whether servers can be preinstalled with OS image in order to shorten provision time. type: boolean pricing: description: This object contains price per time unit and optional multiplier - value if licence price depends on hardware plan or components (e.g. number of - cores) + value if license price depends on hardware plan or components (e.g. number of + cores). type: object provisionable_on: items: type: string type: array release_date: - description: The date when the OS was released + description: The date the upstream operating system maintainer released this version of the OS. type: string format: date release_notes: - description: The current release notes for this OS image, typically in Markdown format + description: The current release notes for this OS image, typically in Markdown format. type: string slug: type: string diff --git a/spec/services/metalv1/oas3.fetched/components/schemas/Project.yaml b/spec/services/metalv1/oas3.fetched/components/schemas/Project.yaml index 5d074398..3e468ff5 100644 --- a/spec/services/metalv1/oas3.fetched/components/schemas/Project.yaml +++ b/spec/services/metalv1/oas3.fetched/components/schemas/Project.yaml @@ -57,10 +57,9 @@ properties: type: array type: type: string - description: The type of the project. Projects of type `vmce` are part of an in development feature and not available to all customers. + description: The type of the project. enum: - default - - vmce tags: items: type: string diff --git a/spec/services/metalv1/oas3.fetched/components/schemas/ProjectCreateFromRootInput.yaml b/spec/services/metalv1/oas3.fetched/components/schemas/ProjectCreateFromRootInput.yaml index e138c704..c4914893 100644 --- a/spec/services/metalv1/oas3.fetched/components/schemas/ProjectCreateFromRootInput.yaml +++ b/spec/services/metalv1/oas3.fetched/components/schemas/ProjectCreateFromRootInput.yaml @@ -15,10 +15,8 @@ properties: type: type: string description: The type of the project. If no type is specified the project type will automatically be `default` - Projects of type 'vmce' are part of an in development feature and not available to all customers. enum: - default - - vmce tags: items: type: string diff --git a/spec/services/metalv1/oas3.fetched/components/schemas/ProjectCreateInput.yaml b/spec/services/metalv1/oas3.fetched/components/schemas/ProjectCreateInput.yaml index 5dd2966b..0ee99596 100644 --- a/spec/services/metalv1/oas3.fetched/components/schemas/ProjectCreateInput.yaml +++ b/spec/services/metalv1/oas3.fetched/components/schemas/ProjectCreateInput.yaml @@ -12,10 +12,8 @@ properties: type: type: string description: The type of the project. If no type is specified the project type will automatically be `default` - Projects of type 'vmce' are part of an in development feature and not available to all customers. enum: - default - - vmce tags: items: type: string diff --git a/spec/services/metalv1/oas3.fetched/components/schemas/Role.yaml b/spec/services/metalv1/oas3.fetched/components/schemas/Role.yaml new file mode 100644 index 00000000..2f91b04e --- /dev/null +++ b/spec/services/metalv1/oas3.fetched/components/schemas/Role.yaml @@ -0,0 +1,9 @@ +properties: + id: + type: string + name: + type: string + actions: + type: array + items: + type: string diff --git a/spec/services/metalv1/oas3.fetched/components/schemas/RoleList.yaml b/spec/services/metalv1/oas3.fetched/components/schemas/RoleList.yaml new file mode 100644 index 00000000..a72af2a9 --- /dev/null +++ b/spec/services/metalv1/oas3.fetched/components/schemas/RoleList.yaml @@ -0,0 +1,10 @@ +properties: + roles: + items: + properties: + id: + type: string + name: + type: string + type: object +type: object diff --git a/spec/services/metalv1/oas3.fetched/components/schemas/ServerInfo.yaml b/spec/services/metalv1/oas3.fetched/components/schemas/ServerInfo.yaml index 83566aa5..4a0ab75e 100644 --- a/spec/services/metalv1/oas3.fetched/components/schemas/ServerInfo.yaml +++ b/spec/services/metalv1/oas3.fetched/components/schemas/ServerInfo.yaml @@ -1,7 +1,4 @@ properties: - facility: - deprecated: true - type: string metro: description: The metro ID or code to check the capacity in. type: string diff --git a/spec/services/metalv1/oas3.fetched/components/schemas/SpotMarketRequestCreateInput.yaml b/spec/services/metalv1/oas3.fetched/components/schemas/SpotMarketRequestCreateInput.yaml index 085397cb..fce94aef 100644 --- a/spec/services/metalv1/oas3.fetched/components/schemas/SpotMarketRequestCreateInput.yaml +++ b/spec/services/metalv1/oas3.fetched/components/schemas/SpotMarketRequestCreateInput.yaml @@ -6,12 +6,6 @@ properties: end_at: format: date-time type: string - facilities: - deprecated: true - items: - format: uuid - type: string - type: array instance_parameters: properties: always_pxe: diff --git a/spec/services/metalv1/oas3.fetched/components/schemas/VirtualNetworkCreateInput.yaml b/spec/services/metalv1/oas3.fetched/components/schemas/VirtualNetworkCreateInput.yaml index 1a74eca6..f5458088 100644 --- a/spec/services/metalv1/oas3.fetched/components/schemas/VirtualNetworkCreateInput.yaml +++ b/spec/services/metalv1/oas3.fetched/components/schemas/VirtualNetworkCreateInput.yaml @@ -1,11 +1,6 @@ properties: description: type: string - facility: - deprecated: true - description: The UUID (or facility code) for the Facility in which to create this - Virtual network. - type: string metro: description: The UUID (or metro code) for the Metro in which to create this Virtual Network. diff --git a/spec/services/metalv1/oas3.fetched/components/schemas/VlanFabricVcCreateInput.yaml b/spec/services/metalv1/oas3.fetched/components/schemas/VlanFabricVcCreateInput.yaml index b08a4f55..ba797e04 100644 --- a/spec/services/metalv1/oas3.fetched/components/schemas/VlanFabricVcCreateInput.yaml +++ b/spec/services/metalv1/oas3.fetched/components/schemas/VlanFabricVcCreateInput.yaml @@ -5,9 +5,6 @@ properties: format: email description: type: string - facility_id: - type: string - x-deprecated: true metro: description: A Metro ID or code. When creating Fabric VCs (Metal Billed), this is where interconnection will be originating from, as we pre-authorize the use of one of our shared ports as the origin of the interconnection using A-Side service tokens. We only allow local connections for Fabric VCs (Metal Billed), so the destination location must be the same as the origin. For Fabric VCs (Fabric Billed), or shared connections, this will be the destination of the interconnection. We allow remote connections for Fabric VCs (Fabric Billed), diff --git a/spec/services/metalv1/oas3.fetched/components/schemas/VrfFabricVcCreateInput.yaml b/spec/services/metalv1/oas3.fetched/components/schemas/VrfFabricVcCreateInput.yaml index 7b73e153..87b519c7 100644 --- a/spec/services/metalv1/oas3.fetched/components/schemas/VrfFabricVcCreateInput.yaml +++ b/spec/services/metalv1/oas3.fetched/components/schemas/VrfFabricVcCreateInput.yaml @@ -5,9 +5,6 @@ properties: format: email description: type: string - facility_id: - type: string - x-deprecated: true metro: description: A Metro ID or code. When creating Fabric VCs (Metal Billed), this is where interconnection will be originating from, as we pre-authorize the use of one of our shared ports as the origin of the interconnection using A-Side service tokens. We only allow local connections for Fabric VCs (Metal Billed), so the destination location must be the same as the origin. For Fabric VCs (Fabric Billed), or shared connections, this will be the destination of the interconnection. We allow remote connections for Fabric VCs (Fabric Billed), diff --git a/spec/services/metalv1/oas3.fetched/openapi3.yaml b/spec/services/metalv1/oas3.fetched/openapi3.yaml index 27d44abe..c0f17c9e 100644 --- a/spec/services/metalv1/oas3.fetched/openapi3.yaml +++ b/spec/services/metalv1/oas3.fetched/openapi3.yaml @@ -285,6 +285,12 @@ components: $ref: './components/schemas/LicenseUpdateInput.yaml' LineItem: $ref: './components/schemas/LineItem.yaml' + Member: + $ref: './components/schemas/Member.yaml' + MemberList: + $ref: './components/schemas/MemberList.yaml' + MemberUpdateInput: + $ref: './components/schemas/MemberUpdateInput.yaml' Membership: $ref: './components/schemas/Membership.yaml' MembershipInput: @@ -371,6 +377,10 @@ components: $ref: './components/schemas/ProjectUsage.yaml' ProjectUsageList: $ref: './components/schemas/ProjectUsageList.yaml' + Role: + $ref: './components/schemas/Role.yaml' + RoleList: + $ref: './components/schemas/RoleList.yaml' SSHKey: $ref: './components/schemas/SSHKey.yaml' SSHKeyCreateInput: @@ -592,8 +602,6 @@ paths: $ref: ./paths/events.yaml /events/{id}: $ref: ./paths/events/id.yaml - /facilities: - $ref: ./paths/facilities.yaml /hardware-reservations/{id}: $ref: ./paths/hardware-reservations/id.yaml /hardware-reservations/{id}/activate: @@ -642,8 +650,6 @@ paths: $ref: ./paths/organizations.yaml /organizations/{id}: $ref: ./paths/organizations/id.yaml - /organizations/{id}/capacity: - $ref: ./paths/organizations/id/capacity.yaml /organizations/{id}/capacity/metros: $ref: ./paths/organizations/id/capacity/metros.yaml /organizations/{id}/customdata: @@ -652,8 +658,6 @@ paths: $ref: ./paths/organizations/id/devices.yaml /organizations/{id}/events: $ref: ./paths/organizations/id/events.yaml - /organizations/{id}/facilities: - $ref: ./paths/organizations/id/facilities.yaml /organizations/{id}/firmware-sets: $ref: ./paths/organizations/id/firmware-sets.yaml /organizations/{id}/invitations: @@ -668,8 +672,16 @@ paths: $ref: ./paths/organizations/id/plans.yaml /organizations/{id}/projects: $ref: ./paths/organizations/id/projects.yaml + /organizations/{id}/roles: + $ref: ./paths/organizations/id/roles.yaml + /organizations/{id}/roles/{role_id}: + $ref: ./paths/organizations/id/roles/role_id.yaml /organizations/{id}/transfers: $ref: ./paths/organizations/id/transfers.yaml + /organizations/{organization_id}/members: + $ref: ./paths/organizations/organization_id/members.yaml + /organizations/{organization_id}/members/{id}: + $ref: ./paths/organizations/organization_id/members/id.yaml /organizations/{organization_id}/connections: $ref: ./paths/organizations/organization_id/connections.yaml /payment-methods/{id}: @@ -722,8 +734,6 @@ paths: $ref: ./paths/projects/id/devices/batch.yaml /projects/{id}/events: $ref: ./paths/projects/id/events.yaml - /projects/{id}/facilities: - $ref: ./paths/projects/id/facilities.yaml /projects/{id}/firmware-sets: $ref: ./paths/projects/id/firmware-sets.yaml /projects/{id}/global-bgp-ranges: @@ -973,9 +983,7 @@ tags: externalDocs: url: https://deploy.equinix.com/developers/docs/metal/locations/metros/ - description: > - Operating System Management. Check out the product docs to learn more about - [Operating Systems - choices](https://deploy.equinix.com/developers/docs/metal/operating-systems/licensed/). + Operating System Images and Lifecycle Management name: OperatingSystems externalDocs: url: https://deploy.equinix.com/developers/docs/metal/operating-systems/supported/ @@ -1097,6 +1105,7 @@ x-tagGroups: - PasswordResetTokens - PaymentMethods - Projects + - Roles - SSHKeys - SupportRequest - TransferRequests diff --git a/spec/services/metalv1/oas3.fetched/paths/capacity.yaml b/spec/services/metalv1/oas3.fetched/paths/capacity.yaml index 904cdd4c..1abb8fff 100644 --- a/spec/services/metalv1/oas3.fetched/paths/capacity.yaml +++ b/spec/services/metalv1/oas3.fetched/paths/capacity.yaml @@ -34,36 +34,3 @@ get: summary: View capacity tags: - Capacity -post: - deprecated: true - description: Validates if a deploy can be fulfilled. - operationId: checkCapacityForFacility - requestBody: - content: - application/json: - schema: - $ref: '../components/schemas/CapacityInput.yaml' - description: Facility to check capacity in - required: true - responses: - "200": - content: - application/json: - schema: - $ref: '../components/schemas/CapacityCheckPerFacilityList.yaml' - description: ok - "401": - content: - application/json: - schema: - $ref: '../components/schemas/Error.yaml' - description: unauthorized - "422": - content: - application/json: - schema: - $ref: '../components/schemas/Error.yaml' - description: unprocessable entity - summary: Check capacity - tags: - - Capacity diff --git a/spec/services/metalv1/oas3.fetched/paths/facilities.yaml b/spec/services/metalv1/oas3.fetched/paths/facilities.yaml deleted file mode 100644 index 871a4d40..00000000 --- a/spec/services/metalv1/oas3.fetched/paths/facilities.yaml +++ /dev/null @@ -1,50 +0,0 @@ -get: - deprecated: true - description: Provides a listing of available datacenters where you can provision - Packet devices. - operationId: findFacilities - parameters: - - description: Nested attributes to include. Included objects will return their - full attributes. Attribute names can be dotted (up to 3 levels) to included - deeply nested objects. - in: query - name: include - schema: - items: - enum: - - address - - labels - type: string - type: array - style: form - - description: Nested attributes to exclude. Excluded objects will return only the - href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply - nested objects. - in: query - name: exclude - schema: - default: - - address - items: - enum: - - address - - labels - type: string - type: array - style: form - responses: - "200": - content: - application/json: - schema: - $ref: '../components/schemas/FacilityList.yaml' - description: ok - "401": - content: - application/json: - schema: - $ref: '../components/schemas/Error.yaml' - description: unauthorized - summary: Retrieve all facilities - tags: - - Facilities diff --git a/spec/services/metalv1/oas3.fetched/paths/operating-systems.yaml b/spec/services/metalv1/oas3.fetched/paths/operating-systems.yaml index 3afe2ed9..e150d577 100644 --- a/spec/services/metalv1/oas3.fetched/paths/operating-systems.yaml +++ b/spec/services/metalv1/oas3.fetched/paths/operating-systems.yaml @@ -1,5 +1,5 @@ get: - description: Provides a listing of available operating systems to provision your + description: Returns a list of available operating systems to provision your new device with. operationId: findOperatingSystems responses: diff --git a/spec/services/metalv1/oas3.fetched/paths/organizations.yaml b/spec/services/metalv1/oas3.fetched/paths/organizations.yaml index 0a21aaf9..9b8be233 100644 --- a/spec/services/metalv1/oas3.fetched/paths/organizations.yaml +++ b/spec/services/metalv1/oas3.fetched/paths/organizations.yaml @@ -41,44 +41,3 @@ get: summary: Retrieve all organizations tags: - Organizations -post: - description: Creates an organization. - operationId: createOrganization - parameters: - - $ref: '../components/parameters/Include.yaml' - - $ref: '../components/parameters/Exclude.yaml' - requestBody: - content: - application/json: - schema: - $ref: '../components/schemas/OrganizationInput.yaml' - description: Organization to create - required: true - responses: - "201": - content: - application/json: - schema: - $ref: '../components/schemas/Organization.yaml' - description: created - "401": - content: - application/json: - schema: - $ref: '../components/schemas/Error.yaml' - description: unauthorized - "404": - content: - application/json: - schema: - $ref: '../components/schemas/Error.yaml' - description: not found - "422": - content: - application/json: - schema: - $ref: '../components/schemas/Error.yaml' - description: unprocessable entity - summary: Create an organization - tags: - - Organizations diff --git a/spec/services/metalv1/oas3.fetched/paths/organizations/id/capacity.yaml b/spec/services/metalv1/oas3.fetched/paths/organizations/id/capacity.yaml deleted file mode 100644 index 87b47ea6..00000000 --- a/spec/services/metalv1/oas3.fetched/paths/organizations/id/capacity.yaml +++ /dev/null @@ -1,50 +0,0 @@ -get: - description: Returns a list of facilities and plans with their current capacity. - operationId: findOrganizationCapacityPerFacility - parameters: - - description: Organization UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - responses: - "200": - content: - application/json: - schema: - $ref: '../../../components/schemas/CapacityList.yaml' - example: - capacity: - am6: - "c2.medium.x86": - level: "string" - "m2.xlarge.x86": - level: "string" - da11: - "c2.medium.x86": - level: "string" - "m2.xlarge.x86": - level: "string" - sv15: - "c2.medium.x86": - level: "string" - "m2.xlarge.x86": - level: "string" - description: ok - "401": - content: - application/json: - schema: - $ref: '../../../components/schemas/Error.yaml' - description: unauthorized - "403": - content: - application/json: - schema: - $ref: '../../../components/schemas/Error.yaml' - description: forbidden - summary: View available hardware plans per Facility for given organization - tags: - - Capacity 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 b90f70ef..27057b1a 100644 --- a/spec/services/metalv1/oas3.fetched/paths/organizations/id/devices.yaml +++ b/spec/services/metalv1/oas3.fetched/paths/organizations/id/devices.yaml @@ -20,7 +20,6 @@ get: enum: - compute - storage - - vmce - legacy_gen - current_gen example: compute diff --git a/spec/services/metalv1/oas3.fetched/paths/organizations/id/roles.yaml b/spec/services/metalv1/oas3.fetched/paths/organizations/id/roles.yaml new file mode 100644 index 00000000..6369976d --- /dev/null +++ b/spec/services/metalv1/oas3.fetched/paths/organizations/id/roles.yaml @@ -0,0 +1,33 @@ +get: + summary: List available roles + tags: + - Roles + description: This list of roles can be used to update Members or new Invitations with additional permissions. + operationId: listOrganizationRoles + parameters: + - description: Organization UUID + name: id + in: path + required: true + schema: + type: string + format: uuid + responses: + "200": + content: + application/json: + schema: + $ref: '../../../components/schemas/RoleList.yaml' + description: ok + "401": + content: + application/json: + schema: + $ref: '../../../components/schemas/Error.yaml' + description: unauthorized + "403": + content: + application/json: + schema: + $ref: '../../../components/schemas/Error.yaml' + description: forbidden diff --git a/spec/services/metalv1/oas3.fetched/paths/organizations/id/roles/role_id.yaml b/spec/services/metalv1/oas3.fetched/paths/organizations/id/roles/role_id.yaml new file mode 100644 index 00000000..696ff22a --- /dev/null +++ b/spec/services/metalv1/oas3.fetched/paths/organizations/id/roles/role_id.yaml @@ -0,0 +1,39 @@ +get: + summary: Get details about a specific role + tags: + - Roles + description: Learn what actions are in each role. + operationId: getOrganizationRole + parameters: + - name: id + description: Organization UUID + in: path + required: true + schema: + type: string + format: uuid + - name: role_id + description: Role ID + in: path + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '../../../../components/schemas/Role.yaml' + description: ok + "401": + content: + application/json: + schema: + $ref: '../../../../components/schemas/Error.yaml' + description: unauthorized + "403": + content: + application/json: + schema: + $ref: '../../../../components/schemas/Error.yaml' + description: forbidden diff --git a/spec/services/metalv1/oas3.fetched/paths/organizations/organization_id/connections.yaml b/spec/services/metalv1/oas3.fetched/paths/organizations/organization_id/connections.yaml index 2f266f80..5dec996b 100644 --- a/spec/services/metalv1/oas3.fetched/paths/organizations/organization_id/connections.yaml +++ b/spec/services/metalv1/oas3.fetched/paths/organizations/organization_id/connections.yaml @@ -1,5 +1,5 @@ get: - description: List the connections belonging to the organization + description: Returns a list of the interconnections belonging to the Organization. operationId: organizationListInterconnections parameters: - description: UUID of the organization @@ -11,6 +11,12 @@ get: type: string - $ref: '../../../components/parameters/Include.yaml' - $ref: '../../../components/parameters/Exclude.yaml' + - description: Filter the list to return only the interconnections for the specified Project. + in: query + name: project={project_id} + schema: + format: uuid + type: string responses: "200": content: @@ -30,7 +36,7 @@ get: schema: $ref: '../../../components/schemas/Error.yaml' description: not found - summary: List organization connections + summary: List an Organization's interconnections tags: - Interconnections post: diff --git a/spec/services/metalv1/oas3.fetched/paths/organizations/id/facilities.yaml b/spec/services/metalv1/oas3.fetched/paths/organizations/organization_id/members.yaml similarity index 68% rename from spec/services/metalv1/oas3.fetched/paths/organizations/id/facilities.yaml rename to spec/services/metalv1/oas3.fetched/paths/organizations/organization_id/members.yaml index cf47c1a4..de5d1a5c 100644 --- a/spec/services/metalv1/oas3.fetched/paths/organizations/id/facilities.yaml +++ b/spec/services/metalv1/oas3.fetched/paths/organizations/organization_id/members.yaml @@ -1,23 +1,21 @@ get: - deprecated: true - description: Returns a listing of available datacenters for the given organization - operationId: findFacilitiesByOrganization + description: Get all Members of an Organization + operationId: getOrganizationMembers parameters: + - $ref: '../../../components/parameters/Include.yaml' - description: Organization UUID in: path - name: id + name: organization_id required: true schema: format: uuid type: string - - $ref: '../../../components/parameters/Include.yaml' - - $ref: '../../../components/parameters/Exclude.yaml' responses: "200": content: application/json: schema: - $ref: '../../../components/schemas/FacilityList.yaml' + $ref: '../../../components/schemas/MemberList.yaml' description: ok "401": content: @@ -37,6 +35,6 @@ get: schema: $ref: '../../../components/schemas/Error.yaml' description: not found - summary: Retrieve all facilities visible by the organization + summary: Retrieve organization members tags: - - Facilities + - Organizations diff --git a/spec/services/metalv1/oas3.fetched/paths/organizations/organization_id/members/id.yaml b/spec/services/metalv1/oas3.fetched/paths/organizations/organization_id/members/id.yaml new file mode 100644 index 00000000..6ba988a1 --- /dev/null +++ b/spec/services/metalv1/oas3.fetched/paths/organizations/organization_id/members/id.yaml @@ -0,0 +1,100 @@ +put: + summary: Update roles for an organization member + operationId: updateOrganizationMemberRoles + description: | + Update organization member by assigning roles that determine which actions they can perform within the organization. + tags: + - Organizations + parameters: + - description: Organization UUID + in: path + required: true + name: organization_id + schema: + format: uuid + type: string + - description: Member UUID + in: path + required: true + name: id + schema: + format: uuid + type: string + requestBody: + content: + application/json: + schema: + $ref: '../../../../components/schemas/MemberUpdateInput.yaml' + description: Organization to update + responses: + "200": + content: + application/json: + schema: + $ref: '../../../../components/schemas/Member.yaml' + description: ok + "401": + content: + application/json: + schema: + $ref: '../../../../components/schemas/Error.yaml' + description: unauthorized + "403": + content: + application/json: + schema: + $ref: '../../../../components/schemas/Error.yaml' + description: forbidden + "404": + content: + application/json: + schema: + $ref: '../../../../components/schemas/Error.yaml' + description: not found + "422": + content: + application/json: + schema: + $ref: '../../../../components/schemas/Error.yaml' + description: unprocessable entity +delete: + summary: Remove member from the organization + operationId: removeOrganizationMember + tags: + - Organizations + parameters: + - description: Organization UUID + in: path + required: true + name: organization_id + schema: + format: uuid + type: string + - description: Member UUID + in: path + required: true + name: id + schema: + format: uuid + type: string + responses: + "204": + description: no content + "401": + content: + application/json: + schema: + $ref: '../../../../components/schemas/Error.yaml' + description: unauthorized + "403": + content: + application/json: + schema: + $ref: '../../../../components/schemas/Error.yaml' + description: forbidden + "404": + content: + application/json: + schema: + $ref: '../../../../components/schemas/Error.yaml' + description: not found diff --git a/spec/services/metalv1/oas3.fetched/paths/plans.yaml b/spec/services/metalv1/oas3.fetched/paths/plans.yaml index 05764589..9dbbf7ba 100644 --- a/spec/services/metalv1/oas3.fetched/paths/plans.yaml +++ b/spec/services/metalv1/oas3.fetched/paths/plans.yaml @@ -12,7 +12,6 @@ get: enum: - compute - storage - - vmce - legacy_gen - current_gen example: compute 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 63e93d74..3af10a6c 100644 --- a/spec/services/metalv1/oas3.fetched/paths/projects/id/devices.yaml +++ b/spec/services/metalv1/oas3.fetched/paths/projects/id/devices.yaml @@ -20,7 +20,6 @@ get: enum: - compute - storage - - vmce - legacy_gen - current_gen example: compute @@ -116,9 +115,7 @@ post: content: application/json: schema: - oneOf: - - $ref: '../../../components/schemas/DeviceCreateInMetroInput.yaml' - - $ref: '../../../components/schemas/DeviceCreateInFacilityInput.yaml' + $ref: '../../../components/schemas/DeviceCreateInMetroInput.yaml' description: Device to create required: true responses: diff --git a/spec/services/metalv1/oas3.fetched/paths/projects/id/facilities.yaml b/spec/services/metalv1/oas3.fetched/paths/projects/id/facilities.yaml deleted file mode 100644 index 8c32b31b..00000000 --- a/spec/services/metalv1/oas3.fetched/paths/projects/id/facilities.yaml +++ /dev/null @@ -1,42 +0,0 @@ -get: - deprecated: true - description: Returns a listing of available datacenters for the given project - operationId: findFacilitiesByProject - parameters: - - description: Project UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - - $ref: '../../../components/parameters/Include.yaml' - - $ref: '../../../components/parameters/Exclude.yaml' - responses: - "200": - content: - application/json: - schema: - $ref: '../../../components/schemas/FacilityList.yaml' - description: ok - "401": - content: - application/json: - schema: - $ref: '../../../components/schemas/Error.yaml' - description: unauthorized - "403": - content: - application/json: - schema: - $ref: '../../../components/schemas/Error.yaml' - description: forbidden - "404": - content: - application/json: - schema: - $ref: '../../../components/schemas/Error.yaml' - description: not found - summary: Retrieve all facilities visible by the project - tags: - - Facilities diff --git a/spec/services/metalv1/oas3.fetched/paths/projects/id/virtual-networks.yaml b/spec/services/metalv1/oas3.fetched/paths/projects/id/virtual-networks.yaml index d6c86c5f..b1c9d0c2 100644 --- a/spec/services/metalv1/oas3.fetched/paths/projects/id/virtual-networks.yaml +++ b/spec/services/metalv1/oas3.fetched/paths/projects/id/virtual-networks.yaml @@ -11,12 +11,6 @@ get: type: string - $ref: '../../../components/parameters/Include.yaml' - $ref: '../../../components/parameters/Exclude.yaml' - - description: Filter by Facility ID (uuid) or Facility Code - deprecated: true - in: query - name: facility - schema: - type: string - description: Filter by Metro ID (uuid) or Metro Code in: query name: metro diff --git a/spec/services/metalv1/oas3.fetched/paths/projects/project_id/connections.yaml b/spec/services/metalv1/oas3.fetched/paths/projects/project_id/connections.yaml index f00ac06c..0063995e 100644 --- a/spec/services/metalv1/oas3.fetched/paths/projects/project_id/connections.yaml +++ b/spec/services/metalv1/oas3.fetched/paths/projects/project_id/connections.yaml @@ -1,5 +1,5 @@ get: - description: List the connections belonging to the project + description: Returns a List of all the interconnections in an Organization, including the interconnections in the specified Project. To reliably get a list of interconnections filtered to just the interconnections accessible to the specified Project, use the [`/organizations/{organization_id}/interconnections?project={project_id}`](https://deploy.equinix.com/developers/api/metal/#tag/Interconnections/operation/organizationListInterconnections) endpoint, filtering on the Project ID. operationId: projectListInterconnections parameters: - description: UUID of the project @@ -32,7 +32,7 @@ get: schema: $ref: '../../../components/schemas/Error.yaml' description: not found - summary: List project connections + summary: List a Project's and Organization's interconnections tags: - Interconnections post: diff --git a/spec/services/metalv1/oas3.fetched/paths/projects/project_id/self-service/reservations.yaml b/spec/services/metalv1/oas3.fetched/paths/projects/project_id/self-service/reservations.yaml index f3e16aa1..b038c3eb 100644 --- a/spec/services/metalv1/oas3.fetched/paths/projects/project_id/self-service/reservations.yaml +++ b/spec/services/metalv1/oas3.fetched/paths/projects/project_id/self-service/reservations.yaml @@ -21,7 +21,6 @@ get: enum: - compute - storage - - vmce - legacy_gen - current_gen example: compute From 0cdeceb78abecd9b9fb9d4760d183df167292b03 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 19 Dec 2024 21:13:20 +0000 Subject: [PATCH 2/3] sync: patch spec with 2024-12-19 spec --- .../schemas/DedicatedPortCreateInput.yaml | 3 - .../schemas/InstancesBatchCreateInput.yaml | 4 +- .../components/schemas/Interconnection.yaml | 3 - .../components/schemas/Invitation.yaml | 6 ++ .../components/schemas/InvitationInput.yaml | 6 ++ .../components/schemas/Member.yaml | 32 ++++++ .../components/schemas/MemberList.yaml | 6 ++ .../components/schemas/MemberUpdateInput.yaml | 25 +++++ .../components/schemas/Membership.yaml | 4 + .../components/schemas/MetroInput.yaml | 11 +- .../components/schemas/OperatingSystem.yaml | 22 ++-- .../components/schemas/Project.yaml | 3 +- .../schemas/ProjectCreateFromRootInput.yaml | 2 - .../schemas/ProjectCreateInput.yaml | 2 - .../oas3.patched/components/schemas/Role.yaml | 9 ++ .../components/schemas/RoleList.yaml | 10 ++ .../components/schemas/ServerInfo.yaml | 3 - .../schemas/SpotMarketRequestCreateInput.yaml | 6 -- .../schemas/VirtualNetworkCreateInput.yaml | 5 - .../schemas/VlanFabricVcCreateInput.yaml | 3 - .../schemas/VrfFabricVcCreateInput.yaml | 3 - .../metalv1/oas3.patched/openapi3.yaml | 31 ++++-- .../metalv1/oas3.patched/paths/capacity.yaml | 33 ------ .../oas3.patched/paths/facilities.yaml | 50 --------- .../oas3.patched/paths/operating-systems.yaml | 2 +- .../oas3.patched/paths/organizations.yaml | 42 -------- .../oas3.patched/paths/organizations.yaml.rej | 10 ++ .../paths/organizations/id/capacity.yaml | 50 --------- .../paths/organizations/id/devices.yaml | 1 - .../paths/organizations/id/roles.yaml | 33 ++++++ .../paths/organizations/id/roles/role_id.yaml | 39 +++++++ .../organization_id/connections.yaml | 10 +- .../members.yaml} | 16 ++- .../organization_id/members/id.yaml | 100 ++++++++++++++++++ .../metalv1/oas3.patched/paths/plans.yaml | 1 - .../paths/projects/id/devices.yaml | 5 +- .../paths/projects/id/facilities.yaml | 42 -------- .../paths/projects/id/virtual-networks.yaml | 6 -- .../projects/project_id/connections.yaml | 4 +- .../project_id/self-service/reservations.yaml | 1 - 40 files changed, 341 insertions(+), 303 deletions(-) create mode 100644 spec/services/metalv1/oas3.patched/components/schemas/Member.yaml create mode 100644 spec/services/metalv1/oas3.patched/components/schemas/MemberList.yaml create mode 100644 spec/services/metalv1/oas3.patched/components/schemas/MemberUpdateInput.yaml create mode 100644 spec/services/metalv1/oas3.patched/components/schemas/Role.yaml create mode 100644 spec/services/metalv1/oas3.patched/components/schemas/RoleList.yaml delete mode 100644 spec/services/metalv1/oas3.patched/paths/facilities.yaml create mode 100644 spec/services/metalv1/oas3.patched/paths/organizations.yaml.rej delete mode 100644 spec/services/metalv1/oas3.patched/paths/organizations/id/capacity.yaml create mode 100644 spec/services/metalv1/oas3.patched/paths/organizations/id/roles.yaml create mode 100644 spec/services/metalv1/oas3.patched/paths/organizations/id/roles/role_id.yaml rename spec/services/metalv1/oas3.patched/paths/organizations/{id/facilities.yaml => organization_id/members.yaml} (68%) create mode 100644 spec/services/metalv1/oas3.patched/paths/organizations/organization_id/members/id.yaml delete mode 100644 spec/services/metalv1/oas3.patched/paths/projects/id/facilities.yaml diff --git a/spec/services/metalv1/oas3.patched/components/schemas/DedicatedPortCreateInput.yaml b/spec/services/metalv1/oas3.patched/components/schemas/DedicatedPortCreateInput.yaml index c8ad3aff..44fdaf3d 100644 --- a/spec/services/metalv1/oas3.patched/components/schemas/DedicatedPortCreateInput.yaml +++ b/spec/services/metalv1/oas3.patched/components/schemas/DedicatedPortCreateInput.yaml @@ -8,9 +8,6 @@ properties: format: email description: type: string - facility_id: - type: string - x-deprecated: true metro: description: A Metro ID or code. For interconnections with Dedicated Ports, this will be the location of the issued Dedicated Ports. type: string diff --git a/spec/services/metalv1/oas3.patched/components/schemas/InstancesBatchCreateInput.yaml b/spec/services/metalv1/oas3.patched/components/schemas/InstancesBatchCreateInput.yaml index 97c166be..fd5b13d6 100644 --- a/spec/services/metalv1/oas3.patched/components/schemas/InstancesBatchCreateInput.yaml +++ b/spec/services/metalv1/oas3.patched/components/schemas/InstancesBatchCreateInput.yaml @@ -10,9 +10,7 @@ properties: quantity: type: integer description: The number of devices to create in this batch. The hostname may contain an `{{index}}` placeholder, which will be replaced with the index of the device in the batch. For example, if the hostname is `device-{{index}}`, the first device in the batch will have the hostname `device-01`, the second device will have the hostname `device-02`, and so on. - - oneOf: - - $ref: 'DeviceCreateInMetroInput.yaml' - - $ref: 'DeviceCreateInFacilityInput.yaml' + - $ref: 'DeviceCreateInMetroInput.yaml' type: array type: object diff --git a/spec/services/metalv1/oas3.patched/components/schemas/Interconnection.yaml b/spec/services/metalv1/oas3.patched/components/schemas/Interconnection.yaml index 6a7f7fe1..bc203db9 100644 --- a/spec/services/metalv1/oas3.patched/components/schemas/Interconnection.yaml +++ b/spec/services/metalv1/oas3.patched/components/schemas/Interconnection.yaml @@ -3,9 +3,6 @@ properties: type: string description: type: string - facility: - $ref: './Facility.yaml' - x-deprecated: true id: format: uuid type: string diff --git a/spec/services/metalv1/oas3.patched/components/schemas/Invitation.yaml b/spec/services/metalv1/oas3.patched/components/schemas/Invitation.yaml index fb587f0f..74ab6019 100644 --- a/spec/services/metalv1/oas3.patched/components/schemas/Invitation.yaml +++ b/spec/services/metalv1/oas3.patched/components/schemas/Invitation.yaml @@ -34,4 +34,10 @@ properties: updated_at: format: date-time type: string + bound_roles: + type: array + items: + type: string + example: + - "permrv2-:id" type: object diff --git a/spec/services/metalv1/oas3.patched/components/schemas/InvitationInput.yaml b/spec/services/metalv1/oas3.patched/components/schemas/InvitationInput.yaml index 3461ddcb..39ba8b03 100644 --- a/spec/services/metalv1/oas3.patched/components/schemas/InvitationInput.yaml +++ b/spec/services/metalv1/oas3.patched/components/schemas/InvitationInput.yaml @@ -21,6 +21,12 @@ properties: - collaborator - limited_collaborator type: array + bound_roles: + type: array + items: + type: string + example: + - "permrv2-:id" required: - invitee type: object diff --git a/spec/services/metalv1/oas3.patched/components/schemas/Member.yaml b/spec/services/metalv1/oas3.patched/components/schemas/Member.yaml new file mode 100644 index 00000000..49f634c8 --- /dev/null +++ b/spec/services/metalv1/oas3.patched/components/schemas/Member.yaml @@ -0,0 +1,32 @@ +properties: + id: + format: uuid + type: string + roles: + type: array + items: + type: string + enum: + - admin + - billing + - collaborator + - limited_collaborator + projects_count: + type: integer + bound_roles: + type: array + items: + type: string + example: + - "permrv2-:id" + user: + $ref: './Href.yaml' + organization: + $ref: './Href.yaml' + projects: + type: array + items: + type: object + $ref: './Href.yaml' + href: + type: "string" diff --git a/spec/services/metalv1/oas3.patched/components/schemas/MemberList.yaml b/spec/services/metalv1/oas3.patched/components/schemas/MemberList.yaml new file mode 100644 index 00000000..19cdfe42 --- /dev/null +++ b/spec/services/metalv1/oas3.patched/components/schemas/MemberList.yaml @@ -0,0 +1,6 @@ +properties: + members: + items: + $ref: './Member.yaml' + type: array +type: object diff --git a/spec/services/metalv1/oas3.patched/components/schemas/MemberUpdateInput.yaml b/spec/services/metalv1/oas3.patched/components/schemas/MemberUpdateInput.yaml new file mode 100644 index 00000000..0ba1adb3 --- /dev/null +++ b/spec/services/metalv1/oas3.patched/components/schemas/MemberUpdateInput.yaml @@ -0,0 +1,25 @@ +properties: + role: + description: Primary role for the user within the organization + type: array + items: + type: string + enum: + - admin + - billing + - collaborator + - limited_collaborator + bound_roles: + type: array + description: Additional roles that can be bound to the user to grant extra permissions. + items: + type: string + example: + - "permrv2-:id" + project_ids: + description: Project IDs the user should be able to access. This field is only required when role is set to `collaborator` or `limited_collaborator`. + type: array + items: + type: string + format: uuid +type: object diff --git a/spec/services/metalv1/oas3.patched/components/schemas/Membership.yaml b/spec/services/metalv1/oas3.patched/components/schemas/Membership.yaml index 9adde1ac..fdd50e97 100644 --- a/spec/services/metalv1/oas3.patched/components/schemas/Membership.yaml +++ b/spec/services/metalv1/oas3.patched/components/schemas/Membership.yaml @@ -18,4 +18,8 @@ properties: type: string user: $ref: './Href.yaml' + bound_roles: + type: array + items: + type: string type: object diff --git a/spec/services/metalv1/oas3.patched/components/schemas/MetroInput.yaml b/spec/services/metalv1/oas3.patched/components/schemas/MetroInput.yaml index 5cd1b9d5..d4f8d69e 100644 --- a/spec/services/metalv1/oas3.patched/components/schemas/MetroInput.yaml +++ b/spec/services/metalv1/oas3.patched/components/schemas/MetroInput.yaml @@ -6,6 +6,13 @@ properties: Metro code or ID of where the device should be provisioned in, or it can be instructed to create the device in the best available metro with `{ "metro": "any" }`. The special metro value of any means anywhere, any metro. When any is chosen in the request, the metro location is picked per our scheduling algorithms that favor the following factors: hardware reservation location (if requesting reserved hardware), ip reservations, spot instances, etc. The any keyword *does not* optimize for cost, this means that usage costs (instance, transfer, other features dependent on location) will vary. Please check metro value in response to see where the device was created. + + Additionally it is possible to set a prioritized location selection. For example `{ "metro": ["m3", "m2", "any"] }` can be used to prioritize `m3` and then `m2` before accepting `any` metro. If none of the metros provided have availability for the requested device the request will fail. Either metro or facility must be provided. - type: string - example: sv \ No newline at end of file + anyOf: + - type: array + items: + type: string + example: [ "sv", "any"] + - type: string + example: sv \ No newline at end of file diff --git a/spec/services/metalv1/oas3.patched/components/schemas/OperatingSystem.yaml b/spec/services/metalv1/oas3.patched/components/schemas/OperatingSystem.yaml index b1171edf..81e4f5ae 100644 --- a/spec/services/metalv1/oas3.patched/components/schemas/OperatingSystem.yaml +++ b/spec/services/metalv1/oas3.patched/components/schemas/OperatingSystem.yaml @@ -1,10 +1,10 @@ properties: build_date: - description: The date on which the current OS image was build and released + description: The date when Metal's current OS image was built and released. type: string format: date deprecation_date: - description: The date when the OS is deprecated + description: The date when the OS is deprecated. This is the date set by the upstream operating system maintainer. type: string format: date distro: @@ -12,43 +12,43 @@ properties: distro_label: type: string end_of_life_date: - description: The OS no longer receives any updates and may be disabled at any time + description: The date when the Metal OS image no longer receives any updates and may be disabled at any time. Typically the same as the deprecation date set by the upstream OS maintainers. type: string format: date end_of_service_date: - description: When the OS is nearing end of life, typically 30 days before end of life + description: Metal-set date for when the OS is nearing end of life, typically 30 days before end of life. type: string format: date id: format: uuid type: string licensed: - description: Licenced OS is priced according to pricing property + description: Indicates if the OS is licensed or not. Licensed operating systems are priced according to pricing property. type: boolean lifecycle_state: - description: Where in the support lifecycle the OS is + description: Where in the lifecycle the OS image is. Possible states are - `"testing"`, `"pre_release"`, `"active"`, `"deprecated"`, `"end_of_service"`, or `"end_of_life"`. type: string name: type: string preinstallable: - description: Servers can be already preinstalled with OS in order to shorten provision + description: Indicates whether servers can be preinstalled with OS image in order to shorten provision time. type: boolean pricing: description: This object contains price per time unit and optional multiplier - value if licence price depends on hardware plan or components (e.g. number of - cores) + value if license price depends on hardware plan or components (e.g. number of + cores). type: object provisionable_on: items: type: string type: array release_date: - description: The date when the OS was released + description: The date the upstream operating system maintainer released this version of the OS. type: string format: date release_notes: - description: The current release notes for this OS image, typically in Markdown format + description: The current release notes for this OS image, typically in Markdown format. type: string slug: type: string diff --git a/spec/services/metalv1/oas3.patched/components/schemas/Project.yaml b/spec/services/metalv1/oas3.patched/components/schemas/Project.yaml index 5d074398..3e468ff5 100644 --- a/spec/services/metalv1/oas3.patched/components/schemas/Project.yaml +++ b/spec/services/metalv1/oas3.patched/components/schemas/Project.yaml @@ -57,10 +57,9 @@ properties: type: array type: type: string - description: The type of the project. Projects of type `vmce` are part of an in development feature and not available to all customers. + description: The type of the project. enum: - default - - vmce tags: items: type: string diff --git a/spec/services/metalv1/oas3.patched/components/schemas/ProjectCreateFromRootInput.yaml b/spec/services/metalv1/oas3.patched/components/schemas/ProjectCreateFromRootInput.yaml index e138c704..c4914893 100644 --- a/spec/services/metalv1/oas3.patched/components/schemas/ProjectCreateFromRootInput.yaml +++ b/spec/services/metalv1/oas3.patched/components/schemas/ProjectCreateFromRootInput.yaml @@ -15,10 +15,8 @@ properties: type: type: string description: The type of the project. If no type is specified the project type will automatically be `default` - Projects of type 'vmce' are part of an in development feature and not available to all customers. enum: - default - - vmce tags: items: type: string diff --git a/spec/services/metalv1/oas3.patched/components/schemas/ProjectCreateInput.yaml b/spec/services/metalv1/oas3.patched/components/schemas/ProjectCreateInput.yaml index 5dd2966b..0ee99596 100644 --- a/spec/services/metalv1/oas3.patched/components/schemas/ProjectCreateInput.yaml +++ b/spec/services/metalv1/oas3.patched/components/schemas/ProjectCreateInput.yaml @@ -12,10 +12,8 @@ properties: type: type: string description: The type of the project. If no type is specified the project type will automatically be `default` - Projects of type 'vmce' are part of an in development feature and not available to all customers. enum: - default - - vmce tags: items: type: string diff --git a/spec/services/metalv1/oas3.patched/components/schemas/Role.yaml b/spec/services/metalv1/oas3.patched/components/schemas/Role.yaml new file mode 100644 index 00000000..2f91b04e --- /dev/null +++ b/spec/services/metalv1/oas3.patched/components/schemas/Role.yaml @@ -0,0 +1,9 @@ +properties: + id: + type: string + name: + type: string + actions: + type: array + items: + type: string diff --git a/spec/services/metalv1/oas3.patched/components/schemas/RoleList.yaml b/spec/services/metalv1/oas3.patched/components/schemas/RoleList.yaml new file mode 100644 index 00000000..a72af2a9 --- /dev/null +++ b/spec/services/metalv1/oas3.patched/components/schemas/RoleList.yaml @@ -0,0 +1,10 @@ +properties: + roles: + items: + properties: + id: + type: string + name: + type: string + type: object +type: object diff --git a/spec/services/metalv1/oas3.patched/components/schemas/ServerInfo.yaml b/spec/services/metalv1/oas3.patched/components/schemas/ServerInfo.yaml index 83566aa5..4a0ab75e 100644 --- a/spec/services/metalv1/oas3.patched/components/schemas/ServerInfo.yaml +++ b/spec/services/metalv1/oas3.patched/components/schemas/ServerInfo.yaml @@ -1,7 +1,4 @@ properties: - facility: - deprecated: true - type: string metro: description: The metro ID or code to check the capacity in. type: string diff --git a/spec/services/metalv1/oas3.patched/components/schemas/SpotMarketRequestCreateInput.yaml b/spec/services/metalv1/oas3.patched/components/schemas/SpotMarketRequestCreateInput.yaml index 085397cb..fce94aef 100644 --- a/spec/services/metalv1/oas3.patched/components/schemas/SpotMarketRequestCreateInput.yaml +++ b/spec/services/metalv1/oas3.patched/components/schemas/SpotMarketRequestCreateInput.yaml @@ -6,12 +6,6 @@ properties: end_at: format: date-time type: string - facilities: - deprecated: true - items: - format: uuid - type: string - type: array instance_parameters: properties: always_pxe: diff --git a/spec/services/metalv1/oas3.patched/components/schemas/VirtualNetworkCreateInput.yaml b/spec/services/metalv1/oas3.patched/components/schemas/VirtualNetworkCreateInput.yaml index 1a74eca6..f5458088 100644 --- a/spec/services/metalv1/oas3.patched/components/schemas/VirtualNetworkCreateInput.yaml +++ b/spec/services/metalv1/oas3.patched/components/schemas/VirtualNetworkCreateInput.yaml @@ -1,11 +1,6 @@ properties: description: type: string - facility: - deprecated: true - description: The UUID (or facility code) for the Facility in which to create this - Virtual network. - type: string metro: description: The UUID (or metro code) for the Metro in which to create this Virtual Network. diff --git a/spec/services/metalv1/oas3.patched/components/schemas/VlanFabricVcCreateInput.yaml b/spec/services/metalv1/oas3.patched/components/schemas/VlanFabricVcCreateInput.yaml index b08a4f55..ba797e04 100644 --- a/spec/services/metalv1/oas3.patched/components/schemas/VlanFabricVcCreateInput.yaml +++ b/spec/services/metalv1/oas3.patched/components/schemas/VlanFabricVcCreateInput.yaml @@ -5,9 +5,6 @@ properties: format: email description: type: string - facility_id: - type: string - x-deprecated: true metro: description: A Metro ID or code. When creating Fabric VCs (Metal Billed), this is where interconnection will be originating from, as we pre-authorize the use of one of our shared ports as the origin of the interconnection using A-Side service tokens. We only allow local connections for Fabric VCs (Metal Billed), so the destination location must be the same as the origin. For Fabric VCs (Fabric Billed), or shared connections, this will be the destination of the interconnection. We allow remote connections for Fabric VCs (Fabric Billed), diff --git a/spec/services/metalv1/oas3.patched/components/schemas/VrfFabricVcCreateInput.yaml b/spec/services/metalv1/oas3.patched/components/schemas/VrfFabricVcCreateInput.yaml index 7b73e153..87b519c7 100644 --- a/spec/services/metalv1/oas3.patched/components/schemas/VrfFabricVcCreateInput.yaml +++ b/spec/services/metalv1/oas3.patched/components/schemas/VrfFabricVcCreateInput.yaml @@ -5,9 +5,6 @@ properties: format: email description: type: string - facility_id: - type: string - x-deprecated: true metro: description: A Metro ID or code. When creating Fabric VCs (Metal Billed), this is where interconnection will be originating from, as we pre-authorize the use of one of our shared ports as the origin of the interconnection using A-Side service tokens. We only allow local connections for Fabric VCs (Metal Billed), so the destination location must be the same as the origin. For Fabric VCs (Fabric Billed), or shared connections, this will be the destination of the interconnection. We allow remote connections for Fabric VCs (Fabric Billed), diff --git a/spec/services/metalv1/oas3.patched/openapi3.yaml b/spec/services/metalv1/oas3.patched/openapi3.yaml index 27d44abe..c0f17c9e 100644 --- a/spec/services/metalv1/oas3.patched/openapi3.yaml +++ b/spec/services/metalv1/oas3.patched/openapi3.yaml @@ -285,6 +285,12 @@ components: $ref: './components/schemas/LicenseUpdateInput.yaml' LineItem: $ref: './components/schemas/LineItem.yaml' + Member: + $ref: './components/schemas/Member.yaml' + MemberList: + $ref: './components/schemas/MemberList.yaml' + MemberUpdateInput: + $ref: './components/schemas/MemberUpdateInput.yaml' Membership: $ref: './components/schemas/Membership.yaml' MembershipInput: @@ -371,6 +377,10 @@ components: $ref: './components/schemas/ProjectUsage.yaml' ProjectUsageList: $ref: './components/schemas/ProjectUsageList.yaml' + Role: + $ref: './components/schemas/Role.yaml' + RoleList: + $ref: './components/schemas/RoleList.yaml' SSHKey: $ref: './components/schemas/SSHKey.yaml' SSHKeyCreateInput: @@ -592,8 +602,6 @@ paths: $ref: ./paths/events.yaml /events/{id}: $ref: ./paths/events/id.yaml - /facilities: - $ref: ./paths/facilities.yaml /hardware-reservations/{id}: $ref: ./paths/hardware-reservations/id.yaml /hardware-reservations/{id}/activate: @@ -642,8 +650,6 @@ paths: $ref: ./paths/organizations.yaml /organizations/{id}: $ref: ./paths/organizations/id.yaml - /organizations/{id}/capacity: - $ref: ./paths/organizations/id/capacity.yaml /organizations/{id}/capacity/metros: $ref: ./paths/organizations/id/capacity/metros.yaml /organizations/{id}/customdata: @@ -652,8 +658,6 @@ paths: $ref: ./paths/organizations/id/devices.yaml /organizations/{id}/events: $ref: ./paths/organizations/id/events.yaml - /organizations/{id}/facilities: - $ref: ./paths/organizations/id/facilities.yaml /organizations/{id}/firmware-sets: $ref: ./paths/organizations/id/firmware-sets.yaml /organizations/{id}/invitations: @@ -668,8 +672,16 @@ paths: $ref: ./paths/organizations/id/plans.yaml /organizations/{id}/projects: $ref: ./paths/organizations/id/projects.yaml + /organizations/{id}/roles: + $ref: ./paths/organizations/id/roles.yaml + /organizations/{id}/roles/{role_id}: + $ref: ./paths/organizations/id/roles/role_id.yaml /organizations/{id}/transfers: $ref: ./paths/organizations/id/transfers.yaml + /organizations/{organization_id}/members: + $ref: ./paths/organizations/organization_id/members.yaml + /organizations/{organization_id}/members/{id}: + $ref: ./paths/organizations/organization_id/members/id.yaml /organizations/{organization_id}/connections: $ref: ./paths/organizations/organization_id/connections.yaml /payment-methods/{id}: @@ -722,8 +734,6 @@ paths: $ref: ./paths/projects/id/devices/batch.yaml /projects/{id}/events: $ref: ./paths/projects/id/events.yaml - /projects/{id}/facilities: - $ref: ./paths/projects/id/facilities.yaml /projects/{id}/firmware-sets: $ref: ./paths/projects/id/firmware-sets.yaml /projects/{id}/global-bgp-ranges: @@ -973,9 +983,7 @@ tags: externalDocs: url: https://deploy.equinix.com/developers/docs/metal/locations/metros/ - description: > - Operating System Management. Check out the product docs to learn more about - [Operating Systems - choices](https://deploy.equinix.com/developers/docs/metal/operating-systems/licensed/). + Operating System Images and Lifecycle Management name: OperatingSystems externalDocs: url: https://deploy.equinix.com/developers/docs/metal/operating-systems/supported/ @@ -1097,6 +1105,7 @@ x-tagGroups: - PasswordResetTokens - PaymentMethods - Projects + - Roles - SSHKeys - SupportRequest - TransferRequests diff --git a/spec/services/metalv1/oas3.patched/paths/capacity.yaml b/spec/services/metalv1/oas3.patched/paths/capacity.yaml index 904cdd4c..1abb8fff 100644 --- a/spec/services/metalv1/oas3.patched/paths/capacity.yaml +++ b/spec/services/metalv1/oas3.patched/paths/capacity.yaml @@ -34,36 +34,3 @@ get: summary: View capacity tags: - Capacity -post: - deprecated: true - description: Validates if a deploy can be fulfilled. - operationId: checkCapacityForFacility - requestBody: - content: - application/json: - schema: - $ref: '../components/schemas/CapacityInput.yaml' - description: Facility to check capacity in - required: true - responses: - "200": - content: - application/json: - schema: - $ref: '../components/schemas/CapacityCheckPerFacilityList.yaml' - description: ok - "401": - content: - application/json: - schema: - $ref: '../components/schemas/Error.yaml' - description: unauthorized - "422": - content: - application/json: - schema: - $ref: '../components/schemas/Error.yaml' - description: unprocessable entity - summary: Check capacity - tags: - - Capacity diff --git a/spec/services/metalv1/oas3.patched/paths/facilities.yaml b/spec/services/metalv1/oas3.patched/paths/facilities.yaml deleted file mode 100644 index 871a4d40..00000000 --- a/spec/services/metalv1/oas3.patched/paths/facilities.yaml +++ /dev/null @@ -1,50 +0,0 @@ -get: - deprecated: true - description: Provides a listing of available datacenters where you can provision - Packet devices. - operationId: findFacilities - parameters: - - description: Nested attributes to include. Included objects will return their - full attributes. Attribute names can be dotted (up to 3 levels) to included - deeply nested objects. - in: query - name: include - schema: - items: - enum: - - address - - labels - type: string - type: array - style: form - - description: Nested attributes to exclude. Excluded objects will return only the - href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply - nested objects. - in: query - name: exclude - schema: - default: - - address - items: - enum: - - address - - labels - type: string - type: array - style: form - responses: - "200": - content: - application/json: - schema: - $ref: '../components/schemas/FacilityList.yaml' - description: ok - "401": - content: - application/json: - schema: - $ref: '../components/schemas/Error.yaml' - description: unauthorized - summary: Retrieve all facilities - tags: - - Facilities diff --git a/spec/services/metalv1/oas3.patched/paths/operating-systems.yaml b/spec/services/metalv1/oas3.patched/paths/operating-systems.yaml index 3afe2ed9..e150d577 100644 --- a/spec/services/metalv1/oas3.patched/paths/operating-systems.yaml +++ b/spec/services/metalv1/oas3.patched/paths/operating-systems.yaml @@ -1,5 +1,5 @@ get: - description: Provides a listing of available operating systems to provision your + description: Returns a list of available operating systems to provision your new device with. operationId: findOperatingSystems responses: diff --git a/spec/services/metalv1/oas3.patched/paths/organizations.yaml b/spec/services/metalv1/oas3.patched/paths/organizations.yaml index 0a43328f..9b8be233 100644 --- a/spec/services/metalv1/oas3.patched/paths/organizations.yaml +++ b/spec/services/metalv1/oas3.patched/paths/organizations.yaml @@ -41,45 +41,3 @@ get: summary: Retrieve all organizations tags: - Organizations - x-equinix-metal-paginated-property: Organizations -post: - description: Creates an organization. - operationId: createOrganization - parameters: - - $ref: '../components/parameters/Include.yaml' - - $ref: '../components/parameters/Exclude.yaml' - requestBody: - content: - application/json: - schema: - $ref: '../components/schemas/OrganizationInput.yaml' - description: Organization to create - required: true - responses: - "201": - content: - application/json: - schema: - $ref: '../components/schemas/Organization.yaml' - description: created - "401": - content: - application/json: - schema: - $ref: '../components/schemas/Error.yaml' - description: unauthorized - "404": - content: - application/json: - schema: - $ref: '../components/schemas/Error.yaml' - description: not found - "422": - content: - application/json: - schema: - $ref: '../components/schemas/Error.yaml' - description: unprocessable entity - summary: Create an organization - tags: - - Organizations diff --git a/spec/services/metalv1/oas3.patched/paths/organizations.yaml.rej b/spec/services/metalv1/oas3.patched/paths/organizations.yaml.rej new file mode 100644 index 00000000..5e69b414 --- /dev/null +++ b/spec/services/metalv1/oas3.patched/paths/organizations.yaml.rej @@ -0,0 +1,10 @@ +--- spec/services/metalv1/oas3.patched/paths/organizations.yaml ++++ spec/services/metalv1/oas3.patched/paths/organizations.yaml +@@ -41,6 +41,7 @@ get: + summary: Retrieve all organizations + tags: + - Organizations ++ x-equinix-metal-paginated-property: Organizations + post: + description: Creates an organization. + operationId: createOrganization diff --git a/spec/services/metalv1/oas3.patched/paths/organizations/id/capacity.yaml b/spec/services/metalv1/oas3.patched/paths/organizations/id/capacity.yaml deleted file mode 100644 index 87b47ea6..00000000 --- a/spec/services/metalv1/oas3.patched/paths/organizations/id/capacity.yaml +++ /dev/null @@ -1,50 +0,0 @@ -get: - description: Returns a list of facilities and plans with their current capacity. - operationId: findOrganizationCapacityPerFacility - parameters: - - description: Organization UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - responses: - "200": - content: - application/json: - schema: - $ref: '../../../components/schemas/CapacityList.yaml' - example: - capacity: - am6: - "c2.medium.x86": - level: "string" - "m2.xlarge.x86": - level: "string" - da11: - "c2.medium.x86": - level: "string" - "m2.xlarge.x86": - level: "string" - sv15: - "c2.medium.x86": - level: "string" - "m2.xlarge.x86": - level: "string" - description: ok - "401": - content: - application/json: - schema: - $ref: '../../../components/schemas/Error.yaml' - description: unauthorized - "403": - content: - application/json: - schema: - $ref: '../../../components/schemas/Error.yaml' - description: forbidden - summary: View available hardware plans per Facility for given organization - tags: - - Capacity 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 19c49891..174f96e2 100644 --- a/spec/services/metalv1/oas3.patched/paths/organizations/id/devices.yaml +++ b/spec/services/metalv1/oas3.patched/paths/organizations/id/devices.yaml @@ -20,7 +20,6 @@ get: enum: - compute - storage - - vmce - legacy_gen - current_gen example: compute diff --git a/spec/services/metalv1/oas3.patched/paths/organizations/id/roles.yaml b/spec/services/metalv1/oas3.patched/paths/organizations/id/roles.yaml new file mode 100644 index 00000000..6369976d --- /dev/null +++ b/spec/services/metalv1/oas3.patched/paths/organizations/id/roles.yaml @@ -0,0 +1,33 @@ +get: + summary: List available roles + tags: + - Roles + description: This list of roles can be used to update Members or new Invitations with additional permissions. + operationId: listOrganizationRoles + parameters: + - description: Organization UUID + name: id + in: path + required: true + schema: + type: string + format: uuid + responses: + "200": + content: + application/json: + schema: + $ref: '../../../components/schemas/RoleList.yaml' + description: ok + "401": + content: + application/json: + schema: + $ref: '../../../components/schemas/Error.yaml' + description: unauthorized + "403": + content: + application/json: + schema: + $ref: '../../../components/schemas/Error.yaml' + description: forbidden diff --git a/spec/services/metalv1/oas3.patched/paths/organizations/id/roles/role_id.yaml b/spec/services/metalv1/oas3.patched/paths/organizations/id/roles/role_id.yaml new file mode 100644 index 00000000..696ff22a --- /dev/null +++ b/spec/services/metalv1/oas3.patched/paths/organizations/id/roles/role_id.yaml @@ -0,0 +1,39 @@ +get: + summary: Get details about a specific role + tags: + - Roles + description: Learn what actions are in each role. + operationId: getOrganizationRole + parameters: + - name: id + description: Organization UUID + in: path + required: true + schema: + type: string + format: uuid + - name: role_id + description: Role ID + in: path + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '../../../../components/schemas/Role.yaml' + description: ok + "401": + content: + application/json: + schema: + $ref: '../../../../components/schemas/Error.yaml' + description: unauthorized + "403": + content: + application/json: + schema: + $ref: '../../../../components/schemas/Error.yaml' + description: forbidden diff --git a/spec/services/metalv1/oas3.patched/paths/organizations/organization_id/connections.yaml b/spec/services/metalv1/oas3.patched/paths/organizations/organization_id/connections.yaml index 2f266f80..5dec996b 100644 --- a/spec/services/metalv1/oas3.patched/paths/organizations/organization_id/connections.yaml +++ b/spec/services/metalv1/oas3.patched/paths/organizations/organization_id/connections.yaml @@ -1,5 +1,5 @@ get: - description: List the connections belonging to the organization + description: Returns a list of the interconnections belonging to the Organization. operationId: organizationListInterconnections parameters: - description: UUID of the organization @@ -11,6 +11,12 @@ get: type: string - $ref: '../../../components/parameters/Include.yaml' - $ref: '../../../components/parameters/Exclude.yaml' + - description: Filter the list to return only the interconnections for the specified Project. + in: query + name: project={project_id} + schema: + format: uuid + type: string responses: "200": content: @@ -30,7 +36,7 @@ get: schema: $ref: '../../../components/schemas/Error.yaml' description: not found - summary: List organization connections + summary: List an Organization's interconnections tags: - Interconnections post: diff --git a/spec/services/metalv1/oas3.patched/paths/organizations/id/facilities.yaml b/spec/services/metalv1/oas3.patched/paths/organizations/organization_id/members.yaml similarity index 68% rename from spec/services/metalv1/oas3.patched/paths/organizations/id/facilities.yaml rename to spec/services/metalv1/oas3.patched/paths/organizations/organization_id/members.yaml index cf47c1a4..de5d1a5c 100644 --- a/spec/services/metalv1/oas3.patched/paths/organizations/id/facilities.yaml +++ b/spec/services/metalv1/oas3.patched/paths/organizations/organization_id/members.yaml @@ -1,23 +1,21 @@ get: - deprecated: true - description: Returns a listing of available datacenters for the given organization - operationId: findFacilitiesByOrganization + description: Get all Members of an Organization + operationId: getOrganizationMembers parameters: + - $ref: '../../../components/parameters/Include.yaml' - description: Organization UUID in: path - name: id + name: organization_id required: true schema: format: uuid type: string - - $ref: '../../../components/parameters/Include.yaml' - - $ref: '../../../components/parameters/Exclude.yaml' responses: "200": content: application/json: schema: - $ref: '../../../components/schemas/FacilityList.yaml' + $ref: '../../../components/schemas/MemberList.yaml' description: ok "401": content: @@ -37,6 +35,6 @@ get: schema: $ref: '../../../components/schemas/Error.yaml' description: not found - summary: Retrieve all facilities visible by the organization + summary: Retrieve organization members tags: - - Facilities + - Organizations diff --git a/spec/services/metalv1/oas3.patched/paths/organizations/organization_id/members/id.yaml b/spec/services/metalv1/oas3.patched/paths/organizations/organization_id/members/id.yaml new file mode 100644 index 00000000..6ba988a1 --- /dev/null +++ b/spec/services/metalv1/oas3.patched/paths/organizations/organization_id/members/id.yaml @@ -0,0 +1,100 @@ +put: + summary: Update roles for an organization member + operationId: updateOrganizationMemberRoles + description: | + Update organization member by assigning roles that determine which actions they can perform within the organization. + tags: + - Organizations + parameters: + - description: Organization UUID + in: path + required: true + name: organization_id + schema: + format: uuid + type: string + - description: Member UUID + in: path + required: true + name: id + schema: + format: uuid + type: string + requestBody: + content: + application/json: + schema: + $ref: '../../../../components/schemas/MemberUpdateInput.yaml' + description: Organization to update + responses: + "200": + content: + application/json: + schema: + $ref: '../../../../components/schemas/Member.yaml' + description: ok + "401": + content: + application/json: + schema: + $ref: '../../../../components/schemas/Error.yaml' + description: unauthorized + "403": + content: + application/json: + schema: + $ref: '../../../../components/schemas/Error.yaml' + description: forbidden + "404": + content: + application/json: + schema: + $ref: '../../../../components/schemas/Error.yaml' + description: not found + "422": + content: + application/json: + schema: + $ref: '../../../../components/schemas/Error.yaml' + description: unprocessable entity +delete: + summary: Remove member from the organization + operationId: removeOrganizationMember + tags: + - Organizations + parameters: + - description: Organization UUID + in: path + required: true + name: organization_id + schema: + format: uuid + type: string + - description: Member UUID + in: path + required: true + name: id + schema: + format: uuid + type: string + responses: + "204": + description: no content + "401": + content: + application/json: + schema: + $ref: '../../../../components/schemas/Error.yaml' + description: unauthorized + "403": + content: + application/json: + schema: + $ref: '../../../../components/schemas/Error.yaml' + description: forbidden + "404": + content: + application/json: + schema: + $ref: '../../../../components/schemas/Error.yaml' + description: not found diff --git a/spec/services/metalv1/oas3.patched/paths/plans.yaml b/spec/services/metalv1/oas3.patched/paths/plans.yaml index 05764589..9dbbf7ba 100644 --- a/spec/services/metalv1/oas3.patched/paths/plans.yaml +++ b/spec/services/metalv1/oas3.patched/paths/plans.yaml @@ -12,7 +12,6 @@ get: enum: - compute - storage - - vmce - legacy_gen - current_gen example: compute 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 957bf957..929d4332 100644 --- a/spec/services/metalv1/oas3.patched/paths/projects/id/devices.yaml +++ b/spec/services/metalv1/oas3.patched/paths/projects/id/devices.yaml @@ -20,7 +20,6 @@ get: enum: - compute - storage - - vmce - legacy_gen - current_gen example: compute @@ -117,9 +116,7 @@ post: content: application/json: schema: - oneOf: - - $ref: '../../../components/schemas/DeviceCreateInMetroInput.yaml' - - $ref: '../../../components/schemas/DeviceCreateInFacilityInput.yaml' + $ref: '../../../components/schemas/DeviceCreateInMetroInput.yaml' description: Device to create required: true responses: diff --git a/spec/services/metalv1/oas3.patched/paths/projects/id/facilities.yaml b/spec/services/metalv1/oas3.patched/paths/projects/id/facilities.yaml deleted file mode 100644 index 8c32b31b..00000000 --- a/spec/services/metalv1/oas3.patched/paths/projects/id/facilities.yaml +++ /dev/null @@ -1,42 +0,0 @@ -get: - deprecated: true - description: Returns a listing of available datacenters for the given project - operationId: findFacilitiesByProject - parameters: - - description: Project UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - - $ref: '../../../components/parameters/Include.yaml' - - $ref: '../../../components/parameters/Exclude.yaml' - responses: - "200": - content: - application/json: - schema: - $ref: '../../../components/schemas/FacilityList.yaml' - description: ok - "401": - content: - application/json: - schema: - $ref: '../../../components/schemas/Error.yaml' - description: unauthorized - "403": - content: - application/json: - schema: - $ref: '../../../components/schemas/Error.yaml' - description: forbidden - "404": - content: - application/json: - schema: - $ref: '../../../components/schemas/Error.yaml' - description: not found - summary: Retrieve all facilities visible by the project - tags: - - Facilities diff --git a/spec/services/metalv1/oas3.patched/paths/projects/id/virtual-networks.yaml b/spec/services/metalv1/oas3.patched/paths/projects/id/virtual-networks.yaml index d6c86c5f..b1c9d0c2 100644 --- a/spec/services/metalv1/oas3.patched/paths/projects/id/virtual-networks.yaml +++ b/spec/services/metalv1/oas3.patched/paths/projects/id/virtual-networks.yaml @@ -11,12 +11,6 @@ get: type: string - $ref: '../../../components/parameters/Include.yaml' - $ref: '../../../components/parameters/Exclude.yaml' - - description: Filter by Facility ID (uuid) or Facility Code - deprecated: true - in: query - name: facility - schema: - type: string - description: Filter by Metro ID (uuid) or Metro Code in: query name: metro diff --git a/spec/services/metalv1/oas3.patched/paths/projects/project_id/connections.yaml b/spec/services/metalv1/oas3.patched/paths/projects/project_id/connections.yaml index b9dda2bb..82dc55a6 100644 --- a/spec/services/metalv1/oas3.patched/paths/projects/project_id/connections.yaml +++ b/spec/services/metalv1/oas3.patched/paths/projects/project_id/connections.yaml @@ -1,5 +1,5 @@ get: - description: List the connections belonging to the project + description: Returns a List of all the interconnections in an Organization, including the interconnections in the specified Project. To reliably get a list of interconnections filtered to just the interconnections accessible to the specified Project, use the [`/organizations/{organization_id}/interconnections?project={project_id}`](https://deploy.equinix.com/developers/api/metal/#tag/Interconnections/operation/organizationListInterconnections) endpoint, filtering on the Project ID. operationId: projectListInterconnections parameters: - description: UUID of the project @@ -32,7 +32,7 @@ get: schema: $ref: '../../../components/schemas/Error.yaml' description: not found - summary: List project connections + summary: List a Project's and Organization's interconnections tags: - Interconnections x-equinix-metal-paginated-property: Interconnections diff --git a/spec/services/metalv1/oas3.patched/paths/projects/project_id/self-service/reservations.yaml b/spec/services/metalv1/oas3.patched/paths/projects/project_id/self-service/reservations.yaml index f3e16aa1..b038c3eb 100644 --- a/spec/services/metalv1/oas3.patched/paths/projects/project_id/self-service/reservations.yaml +++ b/spec/services/metalv1/oas3.patched/paths/projects/project_id/self-service/reservations.yaml @@ -21,7 +21,6 @@ get: enum: - compute - storage - - vmce - legacy_gen - current_gen example: compute From a2be47f46534b568be3a4a40542309a369cbc0f5 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 19 Dec 2024 21:13:47 +0000 Subject: [PATCH 3/3] sync: uncommitted changes detected when opening PR --- services/metalv1/README.md | 23 +- services/metalv1/api_capacity.go | 290 ------- services/metalv1/api_devices.go | 22 +- services/metalv1/api_facilities.go | 517 ------------ services/metalv1/api_interconnections.go | 28 +- services/metalv1/api_operating_systems.go | 2 +- services/metalv1/api_organizations.go | 771 ++++++++++++------ services/metalv1/api_roles.go | 303 +++++++ services/metalv1/api_vlans.go | 11 - services/metalv1/client.go | 6 +- services/metalv1/docs/CapacityApi.md | 138 ---- services/metalv1/docs/CreateDeviceRequest.md | 712 ---------------- ...reateOrganizationInterconnectionRequest.md | 26 - .../metalv1/docs/DedicatedPortCreateInput.md | 26 - .../metalv1/docs/DeviceCreateInMetroInput.md | 10 +- services/metalv1/docs/DevicesApi.md | 8 +- services/metalv1/docs/FacilitiesApi.md | 227 ------ .../FindFacilitiesIncludeParameterInner.md | 13 - ...nizationDevicesCategoriesParameterInner.md | 2 - .../InstancesBatchCreateInputBatchesInner.md | 113 ++- services/metalv1/docs/Interconnection.md | 26 - services/metalv1/docs/InterconnectionsApi.md | 14 +- services/metalv1/docs/Invitation.md | 26 + services/metalv1/docs/InvitationInput.md | 26 + services/metalv1/docs/Member.md | 238 ++++++ services/metalv1/docs/MemberList.md | 56 ++ services/metalv1/docs/MemberUpdateInput.md | 108 +++ services/metalv1/docs/Membership.md | 26 + services/metalv1/docs/MetroInput.md | 10 +- services/metalv1/docs/MetroInputMetro.md | 30 + services/metalv1/docs/OperatingSystem.md | 20 +- services/metalv1/docs/OrganizationsApi.md | 291 +++++-- .../docs/ProjectCreateFromRootInputType.md | 2 - services/metalv1/docs/ProjectType.md | 2 - services/metalv1/docs/Role.md | 108 +++ services/metalv1/docs/RoleList.md | 56 ++ services/metalv1/docs/RolesApi.md | 153 ++++ services/metalv1/docs/ServerInfo.md | 26 - .../docs/SpotMarketRequestCreateInput.md | 26 - services/metalv1/docs/VLANsApi.md | 6 +- .../metalv1/docs/VirtualNetworkCreateInput.md | 26 - .../metalv1/docs/VlanFabricVcCreateInput.md | 26 - .../metalv1/docs/VrfFabricVcCreateInput.md | 26 - services/metalv1/go.mod | 6 + services/metalv1/go.sum | 11 + .../metalv1/model_create_device_request.go | 143 ---- .../model_dedicated_port_create_input.go | 37 - .../model_device_create_in_metro_input.go | 13 +- ...find_facilities_include_parameter_inner.go | 108 --- ...tion_devices_categories_parameter_inner.go | 2 - ...tances_batch_create_input_batches_inner.go | 173 ++-- services/metalv1/model_interconnection.go | 37 - services/metalv1/model_invitation.go | 37 + services/metalv1/model_invitation_input.go | 37 + services/metalv1/model_member.go | 410 ++++++++++ services/metalv1/model_member_list.go | 151 ++++ services/metalv1/model_member_update_input.go | 228 ++++++ services/metalv1/model_membership.go | 37 + services/metalv1/model_metro_input.go | 13 +- services/metalv1/model_metro_input_metro.go | 103 +++ services/metalv1/model_operating_system.go | 20 +- ...del_project_create_from_root_input_type.go | 4 +- services/metalv1/model_project_type.go | 4 +- services/metalv1/model_role.go | 225 +++++ services/metalv1/model_role_list.go | 151 ++++ services/metalv1/model_server_info.go | 41 - .../model_spot_market_request_create_input.go | 47 +- .../model_virtual_network_create_input.go | 42 - .../model_vlan_fabric_vc_create_input.go | 37 - .../model_vrf_fabric_vc_create_input.go | 37 - services/metalv1/test/api_capacity_test.go | 22 - services/metalv1/test/api_facilities_test.go | 58 -- .../metalv1/test/api_organizations_test.go | 51 +- services/metalv1/test/api_roles_test.go | 49 ++ 74 files changed, 3575 insertions(+), 3335 deletions(-) delete mode 100644 services/metalv1/api_facilities.go create mode 100644 services/metalv1/api_roles.go delete mode 100644 services/metalv1/docs/CreateDeviceRequest.md delete mode 100644 services/metalv1/docs/FacilitiesApi.md delete mode 100644 services/metalv1/docs/FindFacilitiesIncludeParameterInner.md create mode 100644 services/metalv1/docs/Member.md create mode 100644 services/metalv1/docs/MemberList.md create mode 100644 services/metalv1/docs/MemberUpdateInput.md create mode 100644 services/metalv1/docs/MetroInputMetro.md create mode 100644 services/metalv1/docs/Role.md create mode 100644 services/metalv1/docs/RoleList.md create mode 100644 services/metalv1/docs/RolesApi.md create mode 100644 services/metalv1/go.mod create mode 100644 services/metalv1/go.sum delete mode 100644 services/metalv1/model_create_device_request.go delete mode 100644 services/metalv1/model_find_facilities_include_parameter_inner.go create mode 100644 services/metalv1/model_member.go create mode 100644 services/metalv1/model_member_list.go create mode 100644 services/metalv1/model_member_update_input.go create mode 100644 services/metalv1/model_metro_input_metro.go create mode 100644 services/metalv1/model_role.go create mode 100644 services/metalv1/model_role_list.go delete mode 100644 services/metalv1/test/api_facilities_test.go create mode 100644 services/metalv1/test/api_roles_test.go diff --git a/services/metalv1/README.md b/services/metalv1/README.md index e99ba490..661c71d4 100644 --- a/services/metalv1/README.md +++ b/services/metalv1/README.md @@ -176,11 +176,9 @@ Class | Method | HTTP request | Description *BatchesApi* | [**DeleteBatch**](docs/BatchesApi.md#deletebatch) | **Delete** /batches/{id} | Delete the Batch *BatchesApi* | [**FindBatchById**](docs/BatchesApi.md#findbatchbyid) | **Get** /batches/{id} | Retrieve a Batch *BatchesApi* | [**FindBatchesByProject**](docs/BatchesApi.md#findbatchesbyproject) | **Get** /projects/{id}/batches | Retrieve all batches by project -*CapacityApi* | [**CheckCapacityForFacility**](docs/CapacityApi.md#checkcapacityforfacility) | **Post** /capacity | Check capacity *CapacityApi* | [**CheckCapacityForMetro**](docs/CapacityApi.md#checkcapacityformetro) | **Post** /capacity/metros | Check capacity for a metro *CapacityApi* | [**FindCapacityForFacility**](docs/CapacityApi.md#findcapacityforfacility) | **Get** /capacity | View capacity *CapacityApi* | [**FindCapacityForMetro**](docs/CapacityApi.md#findcapacityformetro) | **Get** /capacity/metros | View capacity for metros -*CapacityApi* | [**FindOrganizationCapacityPerFacility**](docs/CapacityApi.md#findorganizationcapacityperfacility) | **Get** /organizations/{id}/capacity | View available hardware plans per Facility for given organization *CapacityApi* | [**FindOrganizationCapacityPerMetro**](docs/CapacityApi.md#findorganizationcapacitypermetro) | **Get** /organizations/{id}/capacity/metros | View available hardware plans per Metro for given organization *ConsoleLogDetailsApi* | [**CaptureScreenshot**](docs/ConsoleLogDetailsApi.md#capturescreenshot) | **Get** /devices/{id}/diagnostics/screenshot | *DevicesApi* | [**CreateBgpSession**](docs/DevicesApi.md#createbgpsession) | **Post** /devices/{id}/bgp/sessions | Create a BGP session @@ -216,9 +214,6 @@ Class | Method | HTTP request | Description *EventsApi* | [**FindProjectEvents**](docs/EventsApi.md#findprojectevents) | **Get** /projects/{id}/events | Retrieve project's events *EventsApi* | [**FindVirtualCircuitEvents**](docs/EventsApi.md#findvirtualcircuitevents) | **Get** /virtual-circuits/{id}/events | Retrieve virtual circuit events *EventsApi* | [**FindVrfRouteEvents**](docs/EventsApi.md#findvrfrouteevents) | **Get** /routes/{id}/events | Retrieve VRF route events -*FacilitiesApi* | [**FindFacilities**](docs/FacilitiesApi.md#findfacilities) | **Get** /facilities | Retrieve all facilities -*FacilitiesApi* | [**FindFacilitiesByOrganization**](docs/FacilitiesApi.md#findfacilitiesbyorganization) | **Get** /organizations/{id}/facilities | Retrieve all facilities visible by the organization -*FacilitiesApi* | [**FindFacilitiesByProject**](docs/FacilitiesApi.md#findfacilitiesbyproject) | **Get** /projects/{id}/facilities | Retrieve all facilities visible by the project *FirmwareSetsApi* | [**GetOrganizationFirmwareSets**](docs/FirmwareSetsApi.md#getorganizationfirmwaresets) | **Get** /organizations/{id}/firmware-sets | Get Organization's Firmware Sets *FirmwareSetsApi* | [**GetProjectFirmwareSets**](docs/FirmwareSetsApi.md#getprojectfirmwaresets) | **Get** /projects/{id}/firmware-sets | Get Project's Firmware Sets *HardwareReservationsApi* | [**ActivateHardwareReservation**](docs/HardwareReservationsApi.md#activatehardwarereservation) | **Post** /hardware-reservations/{id}/activate | Activate a spare hardware reservation @@ -246,8 +241,8 @@ Class | Method | HTTP request | Description *InterconnectionsApi* | [**ListInterconnectionPortVirtualCircuits**](docs/InterconnectionsApi.md#listinterconnectionportvirtualcircuits) | **Get** /connections/{connection_id}/ports/{port_id}/virtual-circuits | List a interconnection port's virtual circuits *InterconnectionsApi* | [**ListInterconnectionPorts**](docs/InterconnectionsApi.md#listinterconnectionports) | **Get** /connections/{connection_id}/ports | List a interconnection's ports *InterconnectionsApi* | [**ListInterconnectionVirtualCircuits**](docs/InterconnectionsApi.md#listinterconnectionvirtualcircuits) | **Get** /connections/{connection_id}/virtual-circuits | List a interconnection's virtual circuits -*InterconnectionsApi* | [**OrganizationListInterconnections**](docs/InterconnectionsApi.md#organizationlistinterconnections) | **Get** /organizations/{organization_id}/connections | List organization connections -*InterconnectionsApi* | [**ProjectListInterconnections**](docs/InterconnectionsApi.md#projectlistinterconnections) | **Get** /projects/{project_id}/connections | List project connections +*InterconnectionsApi* | [**OrganizationListInterconnections**](docs/InterconnectionsApi.md#organizationlistinterconnections) | **Get** /organizations/{organization_id}/connections | List an Organization's interconnections +*InterconnectionsApi* | [**ProjectListInterconnections**](docs/InterconnectionsApi.md#projectlistinterconnections) | **Get** /projects/{project_id}/connections | List a Project's and Organization's interconnections *InterconnectionsApi* | [**UpdateInterconnection**](docs/InterconnectionsApi.md#updateinterconnection) | **Put** /connections/{connection_id} | Update interconnection *InterconnectionsApi* | [**UpdateVirtualCircuit**](docs/InterconnectionsApi.md#updatevirtualcircuit) | **Put** /virtual-circuits/{id} | Update a virtual circuit *InvitationsApi* | [**AcceptInvitation**](docs/InvitationsApi.md#acceptinvitation) | **Put** /invitations/{id} | Accept an invitation @@ -275,7 +270,6 @@ Class | Method | HTTP request | Description *MetrosApi* | [**GetMetro**](docs/MetrosApi.md#getmetro) | **Get** /locations/metros/{id} | Retrieve a specific Metro's details *OperatingSystemsApi* | [**FindOperatingSystemVersion**](docs/OperatingSystemsApi.md#findoperatingsystemversion) | **Get** /operating-system-versions | Retrieve all operating system versions *OperatingSystemsApi* | [**FindOperatingSystems**](docs/OperatingSystemsApi.md#findoperatingsystems) | **Get** /operating-systems | Retrieve all operating systems -*OrganizationsApi* | [**CreateOrganization**](docs/OrganizationsApi.md#createorganization) | **Post** /organizations | Create an organization *OrganizationsApi* | [**CreateOrganizationInvitation**](docs/OrganizationsApi.md#createorganizationinvitation) | **Post** /organizations/{id}/invitations | Create an invitation for an organization *OrganizationsApi* | [**CreateOrganizationProject**](docs/OrganizationsApi.md#createorganizationproject) | **Post** /organizations/{id}/projects | Create a project for the organization *OrganizationsApi* | [**CreatePaymentMethod**](docs/OrganizationsApi.md#createpaymentmethod) | **Post** /organizations/{id}/payment-methods | Create a payment method for the given organization @@ -289,7 +283,10 @@ Class | Method | HTTP request | Description *OrganizationsApi* | [**FindOrganizationTransfers**](docs/OrganizationsApi.md#findorganizationtransfers) | **Get** /organizations/{id}/transfers | Retrieve all project transfer requests from or to an organization *OrganizationsApi* | [**FindOrganizations**](docs/OrganizationsApi.md#findorganizations) | **Get** /organizations | Retrieve all organizations *OrganizationsApi* | [**FindPlansByOrganization**](docs/OrganizationsApi.md#findplansbyorganization) | **Get** /organizations/{id}/plans | Retrieve all plans visible by the organization +*OrganizationsApi* | [**GetOrganizationMembers**](docs/OrganizationsApi.md#getorganizationmembers) | **Get** /organizations/{organization_id}/members | Retrieve organization members +*OrganizationsApi* | [**RemoveOrganizationMember**](docs/OrganizationsApi.md#removeorganizationmember) | **Delete** /organizations/{organization_id}/members/{id} | Remove member from the organization *OrganizationsApi* | [**UpdateOrganization**](docs/OrganizationsApi.md#updateorganization) | **Put** /organizations/{id} | Update the organization +*OrganizationsApi* | [**UpdateOrganizationMemberRoles**](docs/OrganizationsApi.md#updateorganizationmemberroles) | **Put** /organizations/{organization_id}/members/{id} | Update roles for an organization member *PasswordResetTokensApi* | [**CreatePasswordResetToken**](docs/PasswordResetTokensApi.md#createpasswordresettoken) | **Post** /reset-password | Create a password reset token *PasswordResetTokensApi* | [**ResetPassword**](docs/PasswordResetTokensApi.md#resetpassword) | **Delete** /reset-password | Reset current user password *PaymentMethodsApi* | [**DeletePaymentMethod**](docs/PaymentMethodsApi.md#deletepaymentmethod) | **Delete** /payment-methods/{id} | Delete the payment method @@ -322,6 +319,8 @@ Class | Method | HTTP request | Description *ProjectsApi* | [**FindProjectMemberships**](docs/ProjectsApi.md#findprojectmemberships) | **Get** /projects/{project_id}/memberships | Retrieve project memberships *ProjectsApi* | [**FindProjects**](docs/ProjectsApi.md#findprojects) | **Get** /projects | Retrieve all projects *ProjectsApi* | [**UpdateProject**](docs/ProjectsApi.md#updateproject) | **Put** /projects/{id} | Update the project +*RolesApi* | [**GetOrganizationRole**](docs/RolesApi.md#getorganizationrole) | **Get** /organizations/{id}/roles/{role_id} | Get details about a specific role +*RolesApi* | [**ListOrganizationRoles**](docs/RolesApi.md#listorganizationroles) | **Get** /organizations/{id}/roles | List available roles *SSHKeysApi* | [**CreateProjectSSHKey**](docs/SSHKeysApi.md#createprojectsshkey) | **Post** /projects/{id}/ssh-keys | Create a ssh key for the given project *SSHKeysApi* | [**CreateSSHKey**](docs/SSHKeysApi.md#createsshkey) | **Post** /ssh-keys | Create a ssh key for the current user *SSHKeysApi* | [**DeleteSSHKey**](docs/SSHKeysApi.md#deletesshkey) | **Delete** /ssh-keys/{id} | Delete the ssh key @@ -423,7 +422,6 @@ Class | Method | HTTP request | Description - [CapacityList](docs/CapacityList.md) - [Component](docs/Component.md) - [Coordinates](docs/Coordinates.md) - - [CreateDeviceRequest](docs/CreateDeviceRequest.md) - [CreateEmailInput](docs/CreateEmailInput.md) - [CreateMetalGatewayRequest](docs/CreateMetalGatewayRequest.md) - [CreateOrganizationInterconnectionRequest](docs/CreateOrganizationInterconnectionRequest.md) @@ -468,7 +466,6 @@ Class | Method | HTTP request | Description - [FacilityInput](docs/FacilityInput.md) - [FacilityList](docs/FacilityList.md) - [Filesystem](docs/Filesystem.md) - - [FindFacilitiesIncludeParameterInner](docs/FindFacilitiesIncludeParameterInner.md) - [FindIPAddressById200Response](docs/FindIPAddressById200Response.md) - [FindIPAvailabilitiesCidrParameter](docs/FindIPAvailabilitiesCidrParameter.md) - [FindIPReservationsTypesParameterInner](docs/FindIPReservationsTypesParameterInner.md) @@ -538,6 +535,9 @@ Class | Method | HTTP request | Description - [LicenseUpdateInput](docs/LicenseUpdateInput.md) - [LineItem](docs/LineItem.md) - [LineItemAdjustment](docs/LineItemAdjustment.md) + - [Member](docs/Member.md) + - [MemberList](docs/MemberList.md) + - [MemberUpdateInput](docs/MemberUpdateInput.md) - [Membership](docs/Membership.md) - [MembershipInput](docs/MembershipInput.md) - [MembershipList](docs/MembershipList.md) @@ -555,6 +555,7 @@ Class | Method | HTTP request | Description - [MetalGatewayState](docs/MetalGatewayState.md) - [Metro](docs/Metro.md) - [MetroInput](docs/MetroInput.md) + - [MetroInputMetro](docs/MetroInputMetro.md) - [MetroList](docs/MetroList.md) - [Mount](docs/Mount.md) - [MoveHardwareReservationRequest](docs/MoveHardwareReservationRequest.md) @@ -615,6 +616,8 @@ Class | Method | HTTP request | Description - [Raid](docs/Raid.md) - [RequestIPReservation201Response](docs/RequestIPReservation201Response.md) - [RequestIPReservationRequest](docs/RequestIPReservationRequest.md) + - [Role](docs/Role.md) + - [RoleList](docs/RoleList.md) - [SSHKey](docs/SSHKey.md) - [SSHKeyCreateInput](docs/SSHKeyCreateInput.md) - [SSHKeyInput](docs/SSHKeyInput.md) diff --git a/services/metalv1/api_capacity.go b/services/metalv1/api_capacity.go index d410ff38..55cba15f 100644 --- a/services/metalv1/api_capacity.go +++ b/services/metalv1/api_capacity.go @@ -20,157 +20,6 @@ import ( // CapacityApiService CapacityApi service type CapacityApiService service -type ApiCheckCapacityForFacilityRequest struct { - ctx context.Context - ApiService *CapacityApiService - capacityInput *CapacityInput -} - -// Facility to check capacity in -func (r ApiCheckCapacityForFacilityRequest) CapacityInput(capacityInput CapacityInput) ApiCheckCapacityForFacilityRequest { - r.capacityInput = &capacityInput - return r -} - -func (r ApiCheckCapacityForFacilityRequest) Execute() (*CapacityCheckPerFacilityList, *http.Response, error) { - return r.ApiService.CheckCapacityForFacilityExecute(r) -} - -/* -CheckCapacityForFacility Check capacity - -Validates if a deploy can be fulfilled. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiCheckCapacityForFacilityRequest - -Deprecated -*/ -func (a *CapacityApiService) CheckCapacityForFacility(ctx context.Context) ApiCheckCapacityForFacilityRequest { - return ApiCheckCapacityForFacilityRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// -// @return CapacityCheckPerFacilityList -// -// Deprecated -func (a *CapacityApiService) CheckCapacityForFacilityExecute(r ApiCheckCapacityForFacilityRequest) (*CapacityCheckPerFacilityList, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *CapacityCheckPerFacilityList - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "CapacityApiService.CheckCapacityForFacility") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/capacity" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.capacityInput == nil { - return localVarReturnValue, nil, reportError("capacityInput is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.capacityInput - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["x_auth_token"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-Auth-Token"] = key - } - } - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - type ApiCheckCapacityForMetroRequest struct { ctx context.Context ApiService *CapacityApiService @@ -566,145 +415,6 @@ func (a *CapacityApiService) FindCapacityForMetroExecute(r ApiFindCapacityForMet return localVarReturnValue, localVarHTTPResponse, nil } -type ApiFindOrganizationCapacityPerFacilityRequest struct { - ctx context.Context - ApiService *CapacityApiService - id string -} - -func (r ApiFindOrganizationCapacityPerFacilityRequest) Execute() (*CapacityList, *http.Response, error) { - return r.ApiService.FindOrganizationCapacityPerFacilityExecute(r) -} - -/* -FindOrganizationCapacityPerFacility View available hardware plans per Facility for given organization - -Returns a list of facilities and plans with their current capacity. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id Organization UUID - @return ApiFindOrganizationCapacityPerFacilityRequest -*/ -func (a *CapacityApiService) FindOrganizationCapacityPerFacility(ctx context.Context, id string) ApiFindOrganizationCapacityPerFacilityRequest { - return ApiFindOrganizationCapacityPerFacilityRequest{ - ApiService: a, - ctx: ctx, - id: id, - } -} - -// Execute executes the request -// -// @return CapacityList -func (a *CapacityApiService) FindOrganizationCapacityPerFacilityExecute(r ApiFindOrganizationCapacityPerFacilityRequest) (*CapacityList, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *CapacityList - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "CapacityApiService.FindOrganizationCapacityPerFacility") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/organizations/{id}/capacity" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["x_auth_token"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-Auth-Token"] = key - } - } - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - type ApiFindOrganizationCapacityPerMetroRequest struct { ctx context.Context ApiService *CapacityApiService diff --git a/services/metalv1/api_devices.go b/services/metalv1/api_devices.go index 5808ba24..5867ef03 100644 --- a/services/metalv1/api_devices.go +++ b/services/metalv1/api_devices.go @@ -193,17 +193,17 @@ func (a *DevicesApiService) CreateBgpSessionExecute(r ApiCreateBgpSessionRequest } type ApiCreateDeviceRequest struct { - ctx context.Context - ApiService *DevicesApiService - id string - createDeviceRequest *CreateDeviceRequest - include *[]string - exclude *[]string + ctx context.Context + ApiService *DevicesApiService + id string + deviceCreateInMetroInput *DeviceCreateInMetroInput + include *[]string + exclude *[]string } // Device to create -func (r ApiCreateDeviceRequest) CreateDeviceRequest(createDeviceRequest CreateDeviceRequest) ApiCreateDeviceRequest { - r.createDeviceRequest = &createDeviceRequest +func (r ApiCreateDeviceRequest) DeviceCreateInMetroInput(deviceCreateInMetroInput DeviceCreateInMetroInput) ApiCreateDeviceRequest { + r.deviceCreateInMetroInput = &deviceCreateInMetroInput return r } @@ -264,8 +264,8 @@ func (a *DevicesApiService) CreateDeviceExecute(r ApiCreateDeviceRequest) (*Devi localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} - if r.createDeviceRequest == nil { - return localVarReturnValue, nil, reportError("createDeviceRequest is required and must be specified") + if r.deviceCreateInMetroInput == nil { + return localVarReturnValue, nil, reportError("deviceCreateInMetroInput is required and must be specified") } if r.include != nil { @@ -292,7 +292,7 @@ func (a *DevicesApiService) CreateDeviceExecute(r ApiCreateDeviceRequest) (*Devi localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } // body params - localVarPostBody = r.createDeviceRequest + localVarPostBody = r.deviceCreateInMetroInput if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { diff --git a/services/metalv1/api_facilities.go b/services/metalv1/api_facilities.go deleted file mode 100644 index 855bb8a5..00000000 --- a/services/metalv1/api_facilities.go +++ /dev/null @@ -1,517 +0,0 @@ -/* -Metal API - -Contact: support@equinixmetal.com -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package metalv1 - -import ( - "bytes" - "context" - "io" - "net/http" - "net/url" - "strings" -) - -// FacilitiesApiService FacilitiesApi service -type FacilitiesApiService service - -type ApiFindFacilitiesRequest struct { - ctx context.Context - ApiService *FacilitiesApiService - include *[]FindFacilitiesIncludeParameterInner - exclude *[]FindFacilitiesIncludeParameterInner -} - -// Nested 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 ApiFindFacilitiesRequest) Include(include []FindFacilitiesIncludeParameterInner) ApiFindFacilitiesRequest { - r.include = &include - return r -} - -// Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. -func (r ApiFindFacilitiesRequest) Exclude(exclude []FindFacilitiesIncludeParameterInner) ApiFindFacilitiesRequest { - r.exclude = &exclude - return r -} - -func (r ApiFindFacilitiesRequest) Execute() (*FacilityList, *http.Response, error) { - return r.ApiService.FindFacilitiesExecute(r) -} - -/* -FindFacilities Retrieve all facilities - -Provides a listing of available datacenters where you can provision Packet devices. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiFindFacilitiesRequest - -Deprecated -*/ -func (a *FacilitiesApiService) FindFacilities(ctx context.Context) ApiFindFacilitiesRequest { - return ApiFindFacilitiesRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// -// @return FacilityList -// -// Deprecated -func (a *FacilitiesApiService) FindFacilitiesExecute(r ApiFindFacilitiesRequest) (*FacilityList, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *FacilityList - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FacilitiesApiService.FindFacilities") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/facilities" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - if r.include != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "include", r.include, "csv") - } - if r.exclude != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "exclude", r.exclude, "csv") - } - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["x_auth_token"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-Auth-Token"] = key - } - } - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiFindFacilitiesByOrganizationRequest struct { - ctx context.Context - ApiService *FacilitiesApiService - id string - include *[]string - exclude *[]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. -func (r ApiFindFacilitiesByOrganizationRequest) Include(include []string) ApiFindFacilitiesByOrganizationRequest { - r.include = &include - return r -} - -// Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. -func (r ApiFindFacilitiesByOrganizationRequest) Exclude(exclude []string) ApiFindFacilitiesByOrganizationRequest { - r.exclude = &exclude - return r -} - -func (r ApiFindFacilitiesByOrganizationRequest) Execute() (*FacilityList, *http.Response, error) { - return r.ApiService.FindFacilitiesByOrganizationExecute(r) -} - -/* -FindFacilitiesByOrganization Retrieve all facilities visible by the organization - -Returns a listing of available datacenters for the given organization - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id Organization UUID - @return ApiFindFacilitiesByOrganizationRequest - -Deprecated -*/ -func (a *FacilitiesApiService) FindFacilitiesByOrganization(ctx context.Context, id string) ApiFindFacilitiesByOrganizationRequest { - return ApiFindFacilitiesByOrganizationRequest{ - ApiService: a, - ctx: ctx, - id: id, - } -} - -// Execute executes the request -// -// @return FacilityList -// -// Deprecated -func (a *FacilitiesApiService) FindFacilitiesByOrganizationExecute(r ApiFindFacilitiesByOrganizationRequest) (*FacilityList, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *FacilityList - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FacilitiesApiService.FindFacilitiesByOrganization") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/organizations/{id}/facilities" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - if r.include != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "include", r.include, "csv") - } - if r.exclude != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "exclude", r.exclude, "csv") - } - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["x_auth_token"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-Auth-Token"] = key - } - } - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiFindFacilitiesByProjectRequest struct { - ctx context.Context - ApiService *FacilitiesApiService - id string - include *[]string - exclude *[]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. -func (r ApiFindFacilitiesByProjectRequest) Include(include []string) ApiFindFacilitiesByProjectRequest { - r.include = &include - return r -} - -// Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. -func (r ApiFindFacilitiesByProjectRequest) Exclude(exclude []string) ApiFindFacilitiesByProjectRequest { - r.exclude = &exclude - return r -} - -func (r ApiFindFacilitiesByProjectRequest) Execute() (*FacilityList, *http.Response, error) { - return r.ApiService.FindFacilitiesByProjectExecute(r) -} - -/* -FindFacilitiesByProject Retrieve all facilities visible by the project - -Returns a listing of available datacenters for the given project - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id Project UUID - @return ApiFindFacilitiesByProjectRequest - -Deprecated -*/ -func (a *FacilitiesApiService) FindFacilitiesByProject(ctx context.Context, id string) ApiFindFacilitiesByProjectRequest { - return ApiFindFacilitiesByProjectRequest{ - ApiService: a, - ctx: ctx, - id: id, - } -} - -// Execute executes the request -// -// @return FacilityList -// -// Deprecated -func (a *FacilitiesApiService) FindFacilitiesByProjectExecute(r ApiFindFacilitiesByProjectRequest) (*FacilityList, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *FacilityList - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FacilitiesApiService.FindFacilitiesByProject") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/projects/{id}/facilities" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - if r.include != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "include", r.include, "csv") - } - if r.exclude != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "exclude", r.exclude, "csv") - } - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["x_auth_token"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-Auth-Token"] = key - } - } - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} diff --git a/services/metalv1/api_interconnections.go b/services/metalv1/api_interconnections.go index c6eb2b6d..3d4894d6 100644 --- a/services/metalv1/api_interconnections.go +++ b/services/metalv1/api_interconnections.go @@ -2039,11 +2039,12 @@ func (a *InterconnectionsApiService) ListInterconnectionVirtualCircuitsExecute(r } type ApiOrganizationListInterconnectionsRequest struct { - ctx context.Context - ApiService *InterconnectionsApiService - organizationId string - include *[]string - exclude *[]string + ctx context.Context + ApiService *InterconnectionsApiService + organizationId string + include *[]string + exclude *[]string + projectprojectId *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. @@ -2058,14 +2059,20 @@ func (r ApiOrganizationListInterconnectionsRequest) Exclude(exclude []string) Ap return r } +// Filter the list to return only the interconnections for the specified Project. +func (r ApiOrganizationListInterconnectionsRequest) ProjectprojectId(projectprojectId string) ApiOrganizationListInterconnectionsRequest { + r.projectprojectId = &projectprojectId + return r +} + func (r ApiOrganizationListInterconnectionsRequest) Execute() (*InterconnectionList, *http.Response, error) { return r.ApiService.OrganizationListInterconnectionsExecute(r) } /* -OrganizationListInterconnections List organization connections +OrganizationListInterconnections List an Organization's interconnections -List the connections belonging to the organization +Returns a list of the interconnections belonging to the Organization. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param organizationId UUID of the organization @@ -2108,6 +2115,9 @@ func (a *InterconnectionsApiService) OrganizationListInterconnectionsExecute(r A if r.exclude != nil { parameterAddToHeaderOrQuery(localVarQueryParams, "exclude", r.exclude, "csv") } + if r.projectprojectId != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "project={project_id}", r.projectprojectId, "") + } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -2236,9 +2246,9 @@ func (r ApiProjectListInterconnectionsRequest) Execute() (*InterconnectionList, } /* -ProjectListInterconnections List project connections +ProjectListInterconnections List a Project's and Organization's interconnections -List the connections belonging to the project +Returns a List of all the interconnections in an Organization, including the interconnections in the specified Project. To reliably get a list of interconnections filtered to just the interconnections accessible to the specified Project, use the [`/organizations/{organization_id}/interconnections?project={project_id}`](https://deploy.equinix.com/developers/api/metal/#tag/Interconnections/operation/organizationListInterconnections) endpoint, filtering on the Project ID. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param projectId UUID of the project diff --git a/services/metalv1/api_operating_systems.go b/services/metalv1/api_operating_systems.go index da7e09af..ccfd3060 100644 --- a/services/metalv1/api_operating_systems.go +++ b/services/metalv1/api_operating_systems.go @@ -155,7 +155,7 @@ func (r ApiFindOperatingSystemsRequest) Execute() (*OperatingSystemList, *http.R /* FindOperatingSystems Retrieve all operating systems -Provides a listing of available operating systems to provision your new device with. +Returns a list of available operating systems to provision your new device with. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiFindOperatingSystemsRequest diff --git a/services/metalv1/api_organizations.go b/services/metalv1/api_organizations.go index 4cf14348..87f8cdb1 100644 --- a/services/metalv1/api_organizations.go +++ b/services/metalv1/api_organizations.go @@ -20,184 +20,6 @@ import ( // OrganizationsApiService OrganizationsApi service type OrganizationsApiService service -type ApiCreateOrganizationRequest struct { - ctx context.Context - ApiService *OrganizationsApiService - organizationInput *OrganizationInput - include *[]string - exclude *[]string -} - -// Organization to create -func (r ApiCreateOrganizationRequest) OrganizationInput(organizationInput OrganizationInput) ApiCreateOrganizationRequest { - r.organizationInput = &organizationInput - 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 ApiCreateOrganizationRequest) Include(include []string) ApiCreateOrganizationRequest { - r.include = &include - return r -} - -// Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. -func (r ApiCreateOrganizationRequest) Exclude(exclude []string) ApiCreateOrganizationRequest { - r.exclude = &exclude - return r -} - -func (r ApiCreateOrganizationRequest) Execute() (*Organization, *http.Response, error) { - return r.ApiService.CreateOrganizationExecute(r) -} - -/* -CreateOrganization Create an organization - -Creates an organization. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiCreateOrganizationRequest -*/ -func (a *OrganizationsApiService) CreateOrganization(ctx context.Context) ApiCreateOrganizationRequest { - return ApiCreateOrganizationRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// -// @return Organization -func (a *OrganizationsApiService) CreateOrganizationExecute(r ApiCreateOrganizationRequest) (*Organization, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *Organization - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrganizationsApiService.CreateOrganization") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/organizations" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.organizationInput == nil { - return localVarReturnValue, nil, reportError("organizationInput is required and must be specified") - } - - if r.include != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "include", r.include, "csv") - } - if r.exclude != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "exclude", r.exclude, "csv") - } - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.organizationInput - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["x_auth_token"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-Auth-Token"] = key - } - } - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - type ApiCreateOrganizationInvitationRequest struct { ctx context.Context ApiService *OrganizationsApiService @@ -2205,31 +2027,6 @@ func (a *OrganizationsApiService) FindOrganizationsExecute(r ApiFindOrganization return localVarReturnValue, localVarHTTPResponse, nil } -// ExecuteWithPagination executes the request to fetch and return all pages of results as a single slice -// -// @return OrganizationList -func (r ApiFindOrganizationsRequest) ExecuteWithPagination() (*OrganizationList, error) { - - var items OrganizationList - - pageNumber := int32(1) - - for { - page, _, err := r.Page(pageNumber).Execute() - if err != nil { - return nil, err - } - - items.Organizations = append(items.Organizations, page.Organizations...) - if page.Meta.GetLastPage() <= page.Meta.GetCurrentPage() { - break - } - pageNumber = page.Meta.GetCurrentPage() + 1 - } - - return &items, nil -} - type ApiFindPlansByOrganizationRequest struct { ctx context.Context ApiService *OrganizationsApiService @@ -2400,88 +2197,68 @@ func (a *OrganizationsApiService) FindPlansByOrganizationExecute(r ApiFindPlansB return localVarReturnValue, localVarHTTPResponse, nil } -type ApiUpdateOrganizationRequest struct { - ctx context.Context - ApiService *OrganizationsApiService - id string - organizationInput *OrganizationInput - include *[]string - exclude *[]string -} - -// Organization to update -func (r ApiUpdateOrganizationRequest) OrganizationInput(organizationInput OrganizationInput) ApiUpdateOrganizationRequest { - r.organizationInput = &organizationInput - return r +type ApiGetOrganizationMembersRequest struct { + ctx context.Context + ApiService *OrganizationsApiService + organizationId string + 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. -func (r ApiUpdateOrganizationRequest) Include(include []string) ApiUpdateOrganizationRequest { +func (r ApiGetOrganizationMembersRequest) Include(include []string) ApiGetOrganizationMembersRequest { r.include = &include return r } -// Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. -func (r ApiUpdateOrganizationRequest) Exclude(exclude []string) ApiUpdateOrganizationRequest { - r.exclude = &exclude - return r -} - -func (r ApiUpdateOrganizationRequest) Execute() (*Organization, *http.Response, error) { - return r.ApiService.UpdateOrganizationExecute(r) +func (r ApiGetOrganizationMembersRequest) Execute() (*MemberList, *http.Response, error) { + return r.ApiService.GetOrganizationMembersExecute(r) } /* -UpdateOrganization Update the organization +GetOrganizationMembers Retrieve organization members -Updates the organization. +Get all Members of an Organization @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id Organization UUID - @return ApiUpdateOrganizationRequest + @param organizationId Organization UUID + @return ApiGetOrganizationMembersRequest */ -func (a *OrganizationsApiService) UpdateOrganization(ctx context.Context, id string) ApiUpdateOrganizationRequest { - return ApiUpdateOrganizationRequest{ - ApiService: a, - ctx: ctx, - id: id, +func (a *OrganizationsApiService) GetOrganizationMembers(ctx context.Context, organizationId string) ApiGetOrganizationMembersRequest { + return ApiGetOrganizationMembersRequest{ + ApiService: a, + ctx: ctx, + organizationId: organizationId, } } // Execute executes the request // -// @return Organization -func (a *OrganizationsApiService) UpdateOrganizationExecute(r ApiUpdateOrganizationRequest) (*Organization, *http.Response, error) { +// @return MemberList +func (a *OrganizationsApiService) GetOrganizationMembersExecute(r ApiGetOrganizationMembersRequest) (*MemberList, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPut + localVarHTTPMethod = http.MethodGet localVarPostBody interface{} formFiles []formFile - localVarReturnValue *Organization + localVarReturnValue *MemberList ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrganizationsApiService.UpdateOrganization") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrganizationsApiService.GetOrganizationMembers") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/organizations/{id}" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + localVarPath := localBasePath + "/organizations/{organization_id}/members" + localVarPath = strings.Replace(localVarPath, "{"+"organization_id"+"}", url.PathEscape(parameterValueToString(r.organizationId, "organizationId")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} - if r.organizationInput == nil { - return localVarReturnValue, nil, reportError("organizationInput is required and must be specified") - } if r.include != nil { parameterAddToHeaderOrQuery(localVarQueryParams, "include", r.include, "csv") } - if r.exclude != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "exclude", r.exclude, "csv") - } // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} + localVarHTTPContentTypes := []string{} // set Content-Type header localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) @@ -2497,8 +2274,502 @@ func (a *OrganizationsApiService) UpdateOrganizationExecute(r ApiUpdateOrganizat if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - // body params - localVarPostBody = r.organizationInput + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["x_auth_token"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Auth-Token"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiRemoveOrganizationMemberRequest struct { + ctx context.Context + ApiService *OrganizationsApiService + organizationId string + id string +} + +func (r ApiRemoveOrganizationMemberRequest) Execute() (*http.Response, error) { + return r.ApiService.RemoveOrganizationMemberExecute(r) +} + +/* +RemoveOrganizationMember Remove member from the organization + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param organizationId Organization UUID + @param id Member UUID + @return ApiRemoveOrganizationMemberRequest +*/ +func (a *OrganizationsApiService) RemoveOrganizationMember(ctx context.Context, organizationId string, id string) ApiRemoveOrganizationMemberRequest { + return ApiRemoveOrganizationMemberRequest{ + ApiService: a, + ctx: ctx, + organizationId: organizationId, + id: id, + } +} + +// Execute executes the request +func (a *OrganizationsApiService) RemoveOrganizationMemberExecute(r ApiRemoveOrganizationMemberRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrganizationsApiService.RemoveOrganizationMember") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/organizations/{organization_id}/members/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"organization_id"+"}", url.PathEscape(parameterValueToString(r.organizationId, "organizationId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["x_auth_token"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Auth-Token"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiUpdateOrganizationRequest struct { + ctx context.Context + ApiService *OrganizationsApiService + id string + organizationInput *OrganizationInput + include *[]string + exclude *[]string +} + +// Organization to update +func (r ApiUpdateOrganizationRequest) OrganizationInput(organizationInput OrganizationInput) ApiUpdateOrganizationRequest { + r.organizationInput = &organizationInput + 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 ApiUpdateOrganizationRequest) Include(include []string) ApiUpdateOrganizationRequest { + r.include = &include + return r +} + +// Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. +func (r ApiUpdateOrganizationRequest) Exclude(exclude []string) ApiUpdateOrganizationRequest { + r.exclude = &exclude + return r +} + +func (r ApiUpdateOrganizationRequest) Execute() (*Organization, *http.Response, error) { + return r.ApiService.UpdateOrganizationExecute(r) +} + +/* +UpdateOrganization Update the organization + +Updates the organization. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id Organization UUID + @return ApiUpdateOrganizationRequest +*/ +func (a *OrganizationsApiService) UpdateOrganization(ctx context.Context, id string) ApiUpdateOrganizationRequest { + return ApiUpdateOrganizationRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return Organization +func (a *OrganizationsApiService) UpdateOrganizationExecute(r ApiUpdateOrganizationRequest) (*Organization, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *Organization + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrganizationsApiService.UpdateOrganization") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/organizations/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.organizationInput == nil { + return localVarReturnValue, nil, reportError("organizationInput is required and must be specified") + } + + if r.include != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "include", r.include, "csv") + } + if r.exclude != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude", r.exclude, "csv") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.organizationInput + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["x_auth_token"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Auth-Token"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdateOrganizationMemberRolesRequest struct { + ctx context.Context + ApiService *OrganizationsApiService + organizationId string + id string + memberUpdateInput *MemberUpdateInput +} + +// Organization to update +func (r ApiUpdateOrganizationMemberRolesRequest) MemberUpdateInput(memberUpdateInput MemberUpdateInput) ApiUpdateOrganizationMemberRolesRequest { + r.memberUpdateInput = &memberUpdateInput + return r +} + +func (r ApiUpdateOrganizationMemberRolesRequest) Execute() (*Member, *http.Response, error) { + return r.ApiService.UpdateOrganizationMemberRolesExecute(r) +} + +/* +UpdateOrganizationMemberRoles Update roles for an organization member + +Update organization member by assigning roles that determine which actions they can perform within the organization. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param organizationId Organization UUID + @param id Member UUID + @return ApiUpdateOrganizationMemberRolesRequest +*/ +func (a *OrganizationsApiService) UpdateOrganizationMemberRoles(ctx context.Context, organizationId string, id string) ApiUpdateOrganizationMemberRolesRequest { + return ApiUpdateOrganizationMemberRolesRequest{ + ApiService: a, + ctx: ctx, + organizationId: organizationId, + id: id, + } +} + +// Execute executes the request +// +// @return Member +func (a *OrganizationsApiService) UpdateOrganizationMemberRolesExecute(r ApiUpdateOrganizationMemberRolesRequest) (*Member, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *Member + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrganizationsApiService.UpdateOrganizationMemberRoles") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/organizations/{organization_id}/members/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"organization_id"+"}", url.PathEscape(parameterValueToString(r.organizationId, "organizationId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.memberUpdateInput if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { diff --git a/services/metalv1/api_roles.go b/services/metalv1/api_roles.go new file mode 100644 index 00000000..53691c9f --- /dev/null +++ b/services/metalv1/api_roles.go @@ -0,0 +1,303 @@ +/* +Metal API + +Contact: support@equinixmetal.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package metalv1 + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + +// RolesApiService RolesApi service +type RolesApiService service + +type ApiGetOrganizationRoleRequest struct { + ctx context.Context + ApiService *RolesApiService + id string + roleId string +} + +func (r ApiGetOrganizationRoleRequest) Execute() (*Role, *http.Response, error) { + return r.ApiService.GetOrganizationRoleExecute(r) +} + +/* +GetOrganizationRole Get details about a specific role + +Learn what actions are in each role. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id Organization UUID + @param roleId Role ID + @return ApiGetOrganizationRoleRequest +*/ +func (a *RolesApiService) GetOrganizationRole(ctx context.Context, id string, roleId string) ApiGetOrganizationRoleRequest { + return ApiGetOrganizationRoleRequest{ + ApiService: a, + ctx: ctx, + id: id, + roleId: roleId, + } +} + +// Execute executes the request +// +// @return Role +func (a *RolesApiService) GetOrganizationRoleExecute(r ApiGetOrganizationRoleRequest) (*Role, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *Role + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RolesApiService.GetOrganizationRole") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/organizations/{id}/roles/{role_id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"role_id"+"}", url.PathEscape(parameterValueToString(r.roleId, "roleId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["x_auth_token"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Auth-Token"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListOrganizationRolesRequest struct { + ctx context.Context + ApiService *RolesApiService + id string +} + +func (r ApiListOrganizationRolesRequest) Execute() (*RoleList, *http.Response, error) { + return r.ApiService.ListOrganizationRolesExecute(r) +} + +/* +ListOrganizationRoles List available roles + +This list of roles can be used to update Members or new Invitations with additional permissions. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id Organization UUID + @return ApiListOrganizationRolesRequest +*/ +func (a *RolesApiService) ListOrganizationRoles(ctx context.Context, id string) ApiListOrganizationRolesRequest { + return ApiListOrganizationRolesRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// +// @return RoleList +func (a *RolesApiService) ListOrganizationRolesExecute(r ApiListOrganizationRolesRequest) (*RoleList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *RoleList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RolesApiService.ListOrganizationRoles") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/organizations/{id}/roles" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["x_auth_token"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-Auth-Token"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/services/metalv1/api_vlans.go b/services/metalv1/api_vlans.go index d7a92319..22e802a9 100644 --- a/services/metalv1/api_vlans.go +++ b/services/metalv1/api_vlans.go @@ -388,7 +388,6 @@ type ApiFindVirtualNetworksRequest struct { id string include *[]string exclude *[]string - facility *string metro *string } @@ -404,13 +403,6 @@ func (r ApiFindVirtualNetworksRequest) Exclude(exclude []string) ApiFindVirtualN return r } -// Filter by Facility ID (uuid) or Facility Code -// Deprecated -func (r ApiFindVirtualNetworksRequest) Facility(facility string) ApiFindVirtualNetworksRequest { - r.facility = &facility - return r -} - // Filter by Metro ID (uuid) or Metro Code func (r ApiFindVirtualNetworksRequest) Metro(metro string) ApiFindVirtualNetworksRequest { r.metro = &metro @@ -467,9 +459,6 @@ func (a *VLANsApiService) FindVirtualNetworksExecute(r ApiFindVirtualNetworksReq if r.exclude != nil { parameterAddToHeaderOrQuery(localVarQueryParams, "exclude", r.exclude, "csv") } - if r.facility != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "facility", r.facility, "") - } if r.metro != nil { parameterAddToHeaderOrQuery(localVarQueryParams, "metro", r.metro, "") } diff --git a/services/metalv1/client.go b/services/metalv1/client.go index e53678b9..3edd57a8 100644 --- a/services/metalv1/client.go +++ b/services/metalv1/client.go @@ -62,8 +62,6 @@ type APIClient struct { EventsApi *EventsApiService - FacilitiesApi *FacilitiesApiService - FirmwareSetsApi *FirmwareSetsApiService HardwareReservationsApi *HardwareReservationsApiService @@ -100,6 +98,8 @@ type APIClient struct { ProjectsApi *ProjectsApiService + RolesApi *RolesApiService + SSHKeysApi *SSHKeysApiService SelfServiceReservationsApi *SelfServiceReservationsApiService @@ -149,7 +149,6 @@ func NewAPIClient(cfg *Configuration) *APIClient { c.DevicesApi = (*DevicesApiService)(&c.common) c.EmailsApi = (*EmailsApiService)(&c.common) c.EventsApi = (*EventsApiService)(&c.common) - c.FacilitiesApi = (*FacilitiesApiService)(&c.common) c.FirmwareSetsApi = (*FirmwareSetsApiService)(&c.common) c.HardwareReservationsApi = (*HardwareReservationsApiService)(&c.common) c.IPAddressesApi = (*IPAddressesApiService)(&c.common) @@ -168,6 +167,7 @@ func NewAPIClient(cfg *Configuration) *APIClient { c.PlansApi = (*PlansApiService)(&c.common) c.PortsApi = (*PortsApiService)(&c.common) c.ProjectsApi = (*ProjectsApiService)(&c.common) + c.RolesApi = (*RolesApiService)(&c.common) c.SSHKeysApi = (*SSHKeysApiService)(&c.common) c.SelfServiceReservationsApi = (*SelfServiceReservationsApiService)(&c.common) c.SpotMarketApi = (*SpotMarketApiService)(&c.common) diff --git a/services/metalv1/docs/CapacityApi.md b/services/metalv1/docs/CapacityApi.md index fe40e370..2b16e6b5 100644 --- a/services/metalv1/docs/CapacityApi.md +++ b/services/metalv1/docs/CapacityApi.md @@ -4,81 +4,13 @@ All URIs are relative to *https://api.equinix.com/metal/v1* Method | HTTP request | Description ------------- | ------------- | ------------- -[**CheckCapacityForFacility**](CapacityApi.md#CheckCapacityForFacility) | **Post** /capacity | Check capacity [**CheckCapacityForMetro**](CapacityApi.md#CheckCapacityForMetro) | **Post** /capacity/metros | Check capacity for a metro [**FindCapacityForFacility**](CapacityApi.md#FindCapacityForFacility) | **Get** /capacity | View capacity [**FindCapacityForMetro**](CapacityApi.md#FindCapacityForMetro) | **Get** /capacity/metros | View capacity for metros -[**FindOrganizationCapacityPerFacility**](CapacityApi.md#FindOrganizationCapacityPerFacility) | **Get** /organizations/{id}/capacity | View available hardware plans per Facility for given organization [**FindOrganizationCapacityPerMetro**](CapacityApi.md#FindOrganizationCapacityPerMetro) | **Get** /organizations/{id}/capacity/metros | View available hardware plans per Metro for given organization -## CheckCapacityForFacility - -> CapacityCheckPerFacilityList CheckCapacityForFacility(ctx).CapacityInput(capacityInput).Execute() - -Check capacity - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/equinix/equinix-sdk-go/services/metalv1" -) - -func main() { - capacityInput := *openapiclient.NewCapacityInput() // CapacityInput | Facility to check capacity in - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.CapacityApi.CheckCapacityForFacility(context.Background()).CapacityInput(capacityInput).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `CapacityApi.CheckCapacityForFacility``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `CheckCapacityForFacility`: CapacityCheckPerFacilityList - fmt.Fprintf(os.Stdout, "Response from `CapacityApi.CheckCapacityForFacility`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiCheckCapacityForFacilityRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **capacityInput** | [**CapacityInput**](CapacityInput.md) | Facility to check capacity in | - -### Return type - -[**CapacityCheckPerFacilityList**](CapacityCheckPerFacilityList.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - ## CheckCapacityForMetro > CapacityCheckPerMetroList CheckCapacityForMetro(ctx).CapacityInput(capacityInput).Execute() @@ -267,76 +199,6 @@ Other parameters are passed through a pointer to a apiFindCapacityForMetroReques [[Back to README]](../README.md) -## FindOrganizationCapacityPerFacility - -> CapacityList FindOrganizationCapacityPerFacility(ctx, id).Execute() - -View available hardware plans per Facility for given organization - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/equinix/equinix-sdk-go/services/metalv1" -) - -func main() { - id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Organization UUID - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.CapacityApi.FindOrganizationCapacityPerFacility(context.Background(), id).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `CapacityApi.FindOrganizationCapacityPerFacility``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `FindOrganizationCapacityPerFacility`: CapacityList - fmt.Fprintf(os.Stdout, "Response from `CapacityApi.FindOrganizationCapacityPerFacility`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**id** | **string** | Organization UUID | - -### Other Parameters - -Other parameters are passed through a pointer to a apiFindOrganizationCapacityPerFacilityRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - -### Return type - -[**CapacityList**](CapacityList.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - ## FindOrganizationCapacityPerMetro > CapacityList FindOrganizationCapacityPerMetro(ctx, id).Execute() diff --git a/services/metalv1/docs/CreateDeviceRequest.md b/services/metalv1/docs/CreateDeviceRequest.md deleted file mode 100644 index eb995603..00000000 --- a/services/metalv1/docs/CreateDeviceRequest.md +++ /dev/null @@ -1,712 +0,0 @@ -# CreateDeviceRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Metro** | **string** | Metro code or ID of where the device should be provisioned in, or it can be instructed to create the device in the best available metro with `{ \"metro\": \"any\" }`. The special metro value of any means anywhere, any metro. When any is chosen in the request, the metro location is picked per our scheduling algorithms that favor the following factors: hardware reservation location (if requesting reserved hardware), ip reservations, spot instances, etc. The any keyword *does not* optimize for cost, this means that usage costs (instance, transfer, other features dependent on location) will vary. Please check metro value in response to see where the device was created. Either metro or facility must be provided. | -**AlwaysPxe** | Pointer to **bool** | When true, devices with a `custom_ipxe` OS will always boot to iPXE. The default setting of false ensures that iPXE will be used on only the first boot. | [optional] [default to false] -**BillingCycle** | Pointer to [**DeviceCreateInputBillingCycle**](DeviceCreateInputBillingCycle.md) | | [optional] -**Customdata** | Pointer to **map[string]interface{}** | Customdata is an arbitrary JSON value that can be accessed via the metadata service. | [optional] [default to {}] -**Description** | Pointer to **string** | Any description of the device or how it will be used. This may be used to inform other API consumers with project access. | [optional] -**Features** | Pointer to **[]string** | The features attribute allows you to optionally specify what features your server should have. In the API shorthand syntax, all features listed are `required`: ``` { \"features\": [\"tpm\"] } ``` Alternatively, if you do not require a certain feature, but would prefer to be assigned a server with that feature if there are any available, you may specify that feature with a `preferred` value. The request will not fail if we have no servers with that feature in our inventory. The API offers an alternative syntax for mixing preferred and required features: ``` { \"features\": { \"tpm\": \"required\", \"raid\": \"preferred\" } } ``` The request will only fail if there are no available servers matching the required `tpm` criteria. | [optional] -**HardwareReservationId** | Pointer to **string** | The Hardware Reservation UUID to provision. Alternatively, `next-available` can be specified to select from any of the available hardware reservations. An error will be returned if the requested reservation option is not available. See [Reserved Hardware](https://deploy.equinix.com/developers/docs/metal/deploy/reserved/) for more details. | [optional] [default to ""] -**Hostname** | Pointer to **string** | The hostname to use within the operating system. The same hostname may be used on multiple devices within a project. | [optional] -**IpAddresses** | Pointer to [**[]IPAddress**](IPAddress.md) | The `ip_addresses attribute will allow you to specify the addresses you want created with your device. The default value configures public IPv4, public IPv6, and private IPv4. Private IPv4 address is required. When specifying `ip_addresses`, one of the array items must enable private IPv4. Some operating systems require public IPv4 address. In those cases you will receive an error message if public IPv4 is not enabled. For example, to only configure your server with a private IPv4 address, you can send `{ \"ip_addresses\": [{ \"address_family\": 4, \"public\": false }] }`. It is possible to request a subnet size larger than a `/30` by assigning addresses using the UUID(s) of ip_reservations in your project. For example, `{ \"ip_addresses\": [..., {\"address_family\": 4, \"public\": true, \"ip_reservations\": [\"uuid1\", \"uuid2\"]}] }` To access a server without public IPs, you can use our Out-of-Band console access (SOS) or proxy through another server in the project with public IPs enabled. | [optional] [default to [{address_family=4, public=true}, {address_family=4, public=false}, {address_family=6, public=true}]] -**IpxeScriptUrl** | Pointer to **string** | When set, the device will chainload an iPXE Script at boot fetched from the supplied URL. See [Custom iPXE](https://deploy.equinix.com/developers/docs/metal/operating-systems/custom-ipxe/) for more details. | [optional] -**Locked** | Pointer to **bool** | Whether the device should be locked, preventing accidental deletion. | [optional] [default to false] -**NetworkFrozen** | Pointer to **bool** | If true, this instance can not be converted to a different network type. | [optional] -**NoSshKeys** | Pointer to **bool** | Overrides default behaviour of attaching all of the organization members ssh keys and project ssh keys to device if no specific keys specified | [optional] [default to false] -**OperatingSystem** | **string** | The slug of the operating system to provision. Check the Equinix Metal operating system documentation for rules that may be imposed per operating system, including restrictions on IP address options and device plans. | -**Plan** | **string** | The slug of the device plan to provision. | -**PrivateIpv4SubnetSize** | Pointer to **int32** | Deprecated. Use ip_addresses. Subnet range for addresses allocated to this device. | [optional] -**ProjectSshKeys** | Pointer to **[]string** | A list of UUIDs identifying the device parent project that should be authorized to access this device (typically via /root/.ssh/authorized_keys). These keys will also appear in the device metadata. If no SSH keys are specified (`user_ssh_keys`, `project_ssh_keys`, and `ssh_keys` are all empty lists or omitted), all parent project keys, parent project members keys and organization members keys will be included. This behaviour can be changed with 'no_ssh_keys' option to omit any SSH key being added. | [optional] -**PublicIpv4SubnetSize** | Pointer to **int32** | Deprecated. Use ip_addresses. Subnet range for addresses allocated to this device. Your project must have addresses available for a non-default request. | [optional] -**SpotInstance** | Pointer to **bool** | Create a spot instance. Spot instances are created with a maximum bid price. If the bid price is not met, the spot instance will be terminated as indicated by the `termination_time` field. | [optional] -**SpotPriceMax** | Pointer to **float32** | The maximum amount to bid for a spot instance. | [optional] -**SshKeys** | Pointer to [**[]SSHKeyInput**](SSHKeyInput.md) | A list of new or existing project ssh_keys that should be authorized to access this device (typically via /root/.ssh/authorized_keys). These keys will also appear in the device metadata. These keys are added in addition to any keys defined by `project_ssh_keys` and `user_ssh_keys`. | [optional] -**Storage** | Pointer to [**Storage**](Storage.md) | | [optional] -**Tags** | Pointer to **[]string** | | [optional] -**TerminationTime** | Pointer to **time.Time** | When the device will be terminated. If you don't supply timezone info, the timestamp is assumed to be in UTC. This is commonly set in advance for ephemeral spot market instances but this field may also be set with on-demand and reservation instances to automatically delete the resource at a given time. The termination time can also be used to release a hardware reservation instance at a given time, keeping the reservation open for other uses. On a spot market device, the termination time will be set automatically when outbid. | [optional] -**UserSshKeys** | Pointer to **[]string** | A list of UUIDs identifying the users that should be authorized to access this device (typically via /root/.ssh/authorized_keys). These keys will also appear in the device metadata. The users must be members of the project or organization. If no SSH keys are specified (`user_ssh_keys`, `project_ssh_keys`, and `ssh_keys` are all empty lists or omitted), all parent project keys, parent project members keys and organization members keys will be included. This behaviour can be changed with 'no_ssh_keys' option to omit any SSH key being added. | [optional] -**Userdata** | Pointer to **string** | The userdata presented in the metadata service for this device. Userdata is fetched and interpreted by the operating system installed on the device. Acceptable formats are determined by the operating system, with the exception of a special iPXE enabling syntax which is handled before the operating system starts. See [Server User Data](https://deploy.equinix.com/developers/docs/metal/server-metadata/user-data/) and [Provisioning with Custom iPXE](https://deploy.equinix.com/developers/docs/metal/operating-systems/custom-ipxe/#provisioning-with-custom-ipxe) for more details. | [optional] -**Facility** | **[]string** | The datacenter where the device should be created. Either metro or facility must be provided. The API will accept either a single facility `{ \"facility\": \"f1\" }`, or it can be instructed to create the device in the best available datacenter `{ \"facility\": \"any\" }`. Additionally it is possible to set a prioritized location selection. For example `{ \"facility\": [\"f3\", \"f2\", \"any\"] }` can be used to prioritize `f3` and then `f2` before accepting `any` facility. If none of the facilities provided have availability for the requested device the request will fail. | - -## Methods - -### NewCreateDeviceRequest - -`func NewCreateDeviceRequest(metro string, operatingSystem string, plan string, facility []string, ) *CreateDeviceRequest` - -NewCreateDeviceRequest instantiates a new CreateDeviceRequest object -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 - -### NewCreateDeviceRequestWithDefaults - -`func NewCreateDeviceRequestWithDefaults() *CreateDeviceRequest` - -NewCreateDeviceRequestWithDefaults instantiates a new CreateDeviceRequest object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetMetro - -`func (o *CreateDeviceRequest) GetMetro() string` - -GetMetro returns the Metro field if non-nil, zero value otherwise. - -### GetMetroOk - -`func (o *CreateDeviceRequest) GetMetroOk() (*string, bool)` - -GetMetroOk returns a tuple with the Metro field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetMetro - -`func (o *CreateDeviceRequest) SetMetro(v string)` - -SetMetro sets Metro field to given value. - - -### GetAlwaysPxe - -`func (o *CreateDeviceRequest) GetAlwaysPxe() bool` - -GetAlwaysPxe returns the AlwaysPxe field if non-nil, zero value otherwise. - -### GetAlwaysPxeOk - -`func (o *CreateDeviceRequest) GetAlwaysPxeOk() (*bool, bool)` - -GetAlwaysPxeOk returns a tuple with the AlwaysPxe field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAlwaysPxe - -`func (o *CreateDeviceRequest) SetAlwaysPxe(v bool)` - -SetAlwaysPxe sets AlwaysPxe field to given value. - -### HasAlwaysPxe - -`func (o *CreateDeviceRequest) HasAlwaysPxe() bool` - -HasAlwaysPxe returns a boolean if a field has been set. - -### GetBillingCycle - -`func (o *CreateDeviceRequest) GetBillingCycle() DeviceCreateInputBillingCycle` - -GetBillingCycle returns the BillingCycle field if non-nil, zero value otherwise. - -### GetBillingCycleOk - -`func (o *CreateDeviceRequest) GetBillingCycleOk() (*DeviceCreateInputBillingCycle, bool)` - -GetBillingCycleOk returns a tuple with the BillingCycle field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetBillingCycle - -`func (o *CreateDeviceRequest) SetBillingCycle(v DeviceCreateInputBillingCycle)` - -SetBillingCycle sets BillingCycle field to given value. - -### HasBillingCycle - -`func (o *CreateDeviceRequest) HasBillingCycle() bool` - -HasBillingCycle returns a boolean if a field has been set. - -### GetCustomdata - -`func (o *CreateDeviceRequest) GetCustomdata() map[string]interface{}` - -GetCustomdata returns the Customdata field if non-nil, zero value otherwise. - -### GetCustomdataOk - -`func (o *CreateDeviceRequest) GetCustomdataOk() (*map[string]interface{}, bool)` - -GetCustomdataOk returns a tuple with the Customdata field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetCustomdata - -`func (o *CreateDeviceRequest) SetCustomdata(v map[string]interface{})` - -SetCustomdata sets Customdata field to given value. - -### HasCustomdata - -`func (o *CreateDeviceRequest) HasCustomdata() bool` - -HasCustomdata returns a boolean if a field has been set. - -### GetDescription - -`func (o *CreateDeviceRequest) GetDescription() string` - -GetDescription returns the Description field if non-nil, zero value otherwise. - -### GetDescriptionOk - -`func (o *CreateDeviceRequest) GetDescriptionOk() (*string, bool)` - -GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDescription - -`func (o *CreateDeviceRequest) SetDescription(v string)` - -SetDescription sets Description field to given value. - -### HasDescription - -`func (o *CreateDeviceRequest) HasDescription() bool` - -HasDescription returns a boolean if a field has been set. - -### GetFeatures - -`func (o *CreateDeviceRequest) GetFeatures() []string` - -GetFeatures returns the Features field if non-nil, zero value otherwise. - -### GetFeaturesOk - -`func (o *CreateDeviceRequest) GetFeaturesOk() (*[]string, bool)` - -GetFeaturesOk returns a tuple with the Features field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetFeatures - -`func (o *CreateDeviceRequest) SetFeatures(v []string)` - -SetFeatures sets Features field to given value. - -### HasFeatures - -`func (o *CreateDeviceRequest) HasFeatures() bool` - -HasFeatures returns a boolean if a field has been set. - -### GetHardwareReservationId - -`func (o *CreateDeviceRequest) GetHardwareReservationId() string` - -GetHardwareReservationId returns the HardwareReservationId field if non-nil, zero value otherwise. - -### GetHardwareReservationIdOk - -`func (o *CreateDeviceRequest) GetHardwareReservationIdOk() (*string, bool)` - -GetHardwareReservationIdOk returns a tuple with the HardwareReservationId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetHardwareReservationId - -`func (o *CreateDeviceRequest) SetHardwareReservationId(v string)` - -SetHardwareReservationId sets HardwareReservationId field to given value. - -### HasHardwareReservationId - -`func (o *CreateDeviceRequest) HasHardwareReservationId() bool` - -HasHardwareReservationId returns a boolean if a field has been set. - -### GetHostname - -`func (o *CreateDeviceRequest) GetHostname() string` - -GetHostname returns the Hostname field if non-nil, zero value otherwise. - -### GetHostnameOk - -`func (o *CreateDeviceRequest) GetHostnameOk() (*string, bool)` - -GetHostnameOk returns a tuple with the Hostname field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetHostname - -`func (o *CreateDeviceRequest) SetHostname(v string)` - -SetHostname sets Hostname field to given value. - -### HasHostname - -`func (o *CreateDeviceRequest) HasHostname() bool` - -HasHostname returns a boolean if a field has been set. - -### GetIpAddresses - -`func (o *CreateDeviceRequest) GetIpAddresses() []IPAddress` - -GetIpAddresses returns the IpAddresses field if non-nil, zero value otherwise. - -### GetIpAddressesOk - -`func (o *CreateDeviceRequest) GetIpAddressesOk() (*[]IPAddress, bool)` - -GetIpAddressesOk returns a tuple with the IpAddresses field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIpAddresses - -`func (o *CreateDeviceRequest) SetIpAddresses(v []IPAddress)` - -SetIpAddresses sets IpAddresses field to given value. - -### HasIpAddresses - -`func (o *CreateDeviceRequest) HasIpAddresses() bool` - -HasIpAddresses returns a boolean if a field has been set. - -### GetIpxeScriptUrl - -`func (o *CreateDeviceRequest) GetIpxeScriptUrl() string` - -GetIpxeScriptUrl returns the IpxeScriptUrl field if non-nil, zero value otherwise. - -### GetIpxeScriptUrlOk - -`func (o *CreateDeviceRequest) GetIpxeScriptUrlOk() (*string, bool)` - -GetIpxeScriptUrlOk returns a tuple with the IpxeScriptUrl field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIpxeScriptUrl - -`func (o *CreateDeviceRequest) SetIpxeScriptUrl(v string)` - -SetIpxeScriptUrl sets IpxeScriptUrl field to given value. - -### HasIpxeScriptUrl - -`func (o *CreateDeviceRequest) HasIpxeScriptUrl() bool` - -HasIpxeScriptUrl returns a boolean if a field has been set. - -### GetLocked - -`func (o *CreateDeviceRequest) GetLocked() bool` - -GetLocked returns the Locked field if non-nil, zero value otherwise. - -### GetLockedOk - -`func (o *CreateDeviceRequest) GetLockedOk() (*bool, bool)` - -GetLockedOk returns a tuple with the Locked field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetLocked - -`func (o *CreateDeviceRequest) SetLocked(v bool)` - -SetLocked sets Locked field to given value. - -### HasLocked - -`func (o *CreateDeviceRequest) HasLocked() bool` - -HasLocked returns a boolean if a field has been set. - -### GetNetworkFrozen - -`func (o *CreateDeviceRequest) GetNetworkFrozen() bool` - -GetNetworkFrozen returns the NetworkFrozen field if non-nil, zero value otherwise. - -### GetNetworkFrozenOk - -`func (o *CreateDeviceRequest) GetNetworkFrozenOk() (*bool, bool)` - -GetNetworkFrozenOk returns a tuple with the NetworkFrozen field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetNetworkFrozen - -`func (o *CreateDeviceRequest) SetNetworkFrozen(v bool)` - -SetNetworkFrozen sets NetworkFrozen field to given value. - -### HasNetworkFrozen - -`func (o *CreateDeviceRequest) HasNetworkFrozen() bool` - -HasNetworkFrozen returns a boolean if a field has been set. - -### GetNoSshKeys - -`func (o *CreateDeviceRequest) GetNoSshKeys() bool` - -GetNoSshKeys returns the NoSshKeys field if non-nil, zero value otherwise. - -### GetNoSshKeysOk - -`func (o *CreateDeviceRequest) GetNoSshKeysOk() (*bool, bool)` - -GetNoSshKeysOk returns a tuple with the NoSshKeys field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetNoSshKeys - -`func (o *CreateDeviceRequest) SetNoSshKeys(v bool)` - -SetNoSshKeys sets NoSshKeys field to given value. - -### HasNoSshKeys - -`func (o *CreateDeviceRequest) HasNoSshKeys() bool` - -HasNoSshKeys returns a boolean if a field has been set. - -### GetOperatingSystem - -`func (o *CreateDeviceRequest) GetOperatingSystem() string` - -GetOperatingSystem returns the OperatingSystem field if non-nil, zero value otherwise. - -### GetOperatingSystemOk - -`func (o *CreateDeviceRequest) GetOperatingSystemOk() (*string, bool)` - -GetOperatingSystemOk returns a tuple with the OperatingSystem field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetOperatingSystem - -`func (o *CreateDeviceRequest) SetOperatingSystem(v string)` - -SetOperatingSystem sets OperatingSystem field to given value. - - -### GetPlan - -`func (o *CreateDeviceRequest) GetPlan() string` - -GetPlan returns the Plan field if non-nil, zero value otherwise. - -### GetPlanOk - -`func (o *CreateDeviceRequest) GetPlanOk() (*string, bool)` - -GetPlanOk returns a tuple with the Plan field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetPlan - -`func (o *CreateDeviceRequest) SetPlan(v string)` - -SetPlan sets Plan field to given value. - - -### GetPrivateIpv4SubnetSize - -`func (o *CreateDeviceRequest) GetPrivateIpv4SubnetSize() int32` - -GetPrivateIpv4SubnetSize returns the PrivateIpv4SubnetSize field if non-nil, zero value otherwise. - -### GetPrivateIpv4SubnetSizeOk - -`func (o *CreateDeviceRequest) GetPrivateIpv4SubnetSizeOk() (*int32, bool)` - -GetPrivateIpv4SubnetSizeOk returns a tuple with the PrivateIpv4SubnetSize field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetPrivateIpv4SubnetSize - -`func (o *CreateDeviceRequest) SetPrivateIpv4SubnetSize(v int32)` - -SetPrivateIpv4SubnetSize sets PrivateIpv4SubnetSize field to given value. - -### HasPrivateIpv4SubnetSize - -`func (o *CreateDeviceRequest) HasPrivateIpv4SubnetSize() bool` - -HasPrivateIpv4SubnetSize returns a boolean if a field has been set. - -### GetProjectSshKeys - -`func (o *CreateDeviceRequest) GetProjectSshKeys() []string` - -GetProjectSshKeys returns the ProjectSshKeys field if non-nil, zero value otherwise. - -### GetProjectSshKeysOk - -`func (o *CreateDeviceRequest) GetProjectSshKeysOk() (*[]string, bool)` - -GetProjectSshKeysOk returns a tuple with the ProjectSshKeys field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetProjectSshKeys - -`func (o *CreateDeviceRequest) SetProjectSshKeys(v []string)` - -SetProjectSshKeys sets ProjectSshKeys field to given value. - -### HasProjectSshKeys - -`func (o *CreateDeviceRequest) HasProjectSshKeys() bool` - -HasProjectSshKeys returns a boolean if a field has been set. - -### GetPublicIpv4SubnetSize - -`func (o *CreateDeviceRequest) GetPublicIpv4SubnetSize() int32` - -GetPublicIpv4SubnetSize returns the PublicIpv4SubnetSize field if non-nil, zero value otherwise. - -### GetPublicIpv4SubnetSizeOk - -`func (o *CreateDeviceRequest) GetPublicIpv4SubnetSizeOk() (*int32, bool)` - -GetPublicIpv4SubnetSizeOk returns a tuple with the PublicIpv4SubnetSize field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetPublicIpv4SubnetSize - -`func (o *CreateDeviceRequest) SetPublicIpv4SubnetSize(v int32)` - -SetPublicIpv4SubnetSize sets PublicIpv4SubnetSize field to given value. - -### HasPublicIpv4SubnetSize - -`func (o *CreateDeviceRequest) HasPublicIpv4SubnetSize() bool` - -HasPublicIpv4SubnetSize returns a boolean if a field has been set. - -### GetSpotInstance - -`func (o *CreateDeviceRequest) GetSpotInstance() bool` - -GetSpotInstance returns the SpotInstance field if non-nil, zero value otherwise. - -### GetSpotInstanceOk - -`func (o *CreateDeviceRequest) GetSpotInstanceOk() (*bool, bool)` - -GetSpotInstanceOk returns a tuple with the SpotInstance field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSpotInstance - -`func (o *CreateDeviceRequest) SetSpotInstance(v bool)` - -SetSpotInstance sets SpotInstance field to given value. - -### HasSpotInstance - -`func (o *CreateDeviceRequest) HasSpotInstance() bool` - -HasSpotInstance returns a boolean if a field has been set. - -### GetSpotPriceMax - -`func (o *CreateDeviceRequest) GetSpotPriceMax() float32` - -GetSpotPriceMax returns the SpotPriceMax field if non-nil, zero value otherwise. - -### GetSpotPriceMaxOk - -`func (o *CreateDeviceRequest) GetSpotPriceMaxOk() (*float32, bool)` - -GetSpotPriceMaxOk returns a tuple with the SpotPriceMax field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSpotPriceMax - -`func (o *CreateDeviceRequest) SetSpotPriceMax(v float32)` - -SetSpotPriceMax sets SpotPriceMax field to given value. - -### HasSpotPriceMax - -`func (o *CreateDeviceRequest) HasSpotPriceMax() bool` - -HasSpotPriceMax returns a boolean if a field has been set. - -### GetSshKeys - -`func (o *CreateDeviceRequest) GetSshKeys() []SSHKeyInput` - -GetSshKeys returns the SshKeys field if non-nil, zero value otherwise. - -### GetSshKeysOk - -`func (o *CreateDeviceRequest) GetSshKeysOk() (*[]SSHKeyInput, bool)` - -GetSshKeysOk returns a tuple with the SshKeys field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSshKeys - -`func (o *CreateDeviceRequest) SetSshKeys(v []SSHKeyInput)` - -SetSshKeys sets SshKeys field to given value. - -### HasSshKeys - -`func (o *CreateDeviceRequest) HasSshKeys() bool` - -HasSshKeys returns a boolean if a field has been set. - -### GetStorage - -`func (o *CreateDeviceRequest) GetStorage() Storage` - -GetStorage returns the Storage field if non-nil, zero value otherwise. - -### GetStorageOk - -`func (o *CreateDeviceRequest) GetStorageOk() (*Storage, bool)` - -GetStorageOk returns a tuple with the Storage field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetStorage - -`func (o *CreateDeviceRequest) SetStorage(v Storage)` - -SetStorage sets Storage field to given value. - -### HasStorage - -`func (o *CreateDeviceRequest) HasStorage() bool` - -HasStorage returns a boolean if a field has been set. - -### GetTags - -`func (o *CreateDeviceRequest) GetTags() []string` - -GetTags returns the Tags field if non-nil, zero value otherwise. - -### GetTagsOk - -`func (o *CreateDeviceRequest) GetTagsOk() (*[]string, bool)` - -GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetTags - -`func (o *CreateDeviceRequest) SetTags(v []string)` - -SetTags sets Tags field to given value. - -### HasTags - -`func (o *CreateDeviceRequest) HasTags() bool` - -HasTags returns a boolean if a field has been set. - -### GetTerminationTime - -`func (o *CreateDeviceRequest) GetTerminationTime() time.Time` - -GetTerminationTime returns the TerminationTime field if non-nil, zero value otherwise. - -### GetTerminationTimeOk - -`func (o *CreateDeviceRequest) GetTerminationTimeOk() (*time.Time, bool)` - -GetTerminationTimeOk returns a tuple with the TerminationTime field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetTerminationTime - -`func (o *CreateDeviceRequest) SetTerminationTime(v time.Time)` - -SetTerminationTime sets TerminationTime field to given value. - -### HasTerminationTime - -`func (o *CreateDeviceRequest) HasTerminationTime() bool` - -HasTerminationTime returns a boolean if a field has been set. - -### GetUserSshKeys - -`func (o *CreateDeviceRequest) GetUserSshKeys() []string` - -GetUserSshKeys returns the UserSshKeys field if non-nil, zero value otherwise. - -### GetUserSshKeysOk - -`func (o *CreateDeviceRequest) GetUserSshKeysOk() (*[]string, bool)` - -GetUserSshKeysOk returns a tuple with the UserSshKeys field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetUserSshKeys - -`func (o *CreateDeviceRequest) SetUserSshKeys(v []string)` - -SetUserSshKeys sets UserSshKeys field to given value. - -### HasUserSshKeys - -`func (o *CreateDeviceRequest) HasUserSshKeys() bool` - -HasUserSshKeys returns a boolean if a field has been set. - -### GetUserdata - -`func (o *CreateDeviceRequest) GetUserdata() string` - -GetUserdata returns the Userdata field if non-nil, zero value otherwise. - -### GetUserdataOk - -`func (o *CreateDeviceRequest) GetUserdataOk() (*string, bool)` - -GetUserdataOk returns a tuple with the Userdata field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetUserdata - -`func (o *CreateDeviceRequest) SetUserdata(v string)` - -SetUserdata sets Userdata field to given value. - -### HasUserdata - -`func (o *CreateDeviceRequest) HasUserdata() bool` - -HasUserdata returns a boolean if a field has been set. - -### GetFacility - -`func (o *CreateDeviceRequest) GetFacility() []string` - -GetFacility returns the Facility field if non-nil, zero value otherwise. - -### GetFacilityOk - -`func (o *CreateDeviceRequest) GetFacilityOk() (*[]string, bool)` - -GetFacilityOk returns a tuple with the Facility field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetFacility - -`func (o *CreateDeviceRequest) SetFacility(v []string)` - -SetFacility sets Facility field to given value. - - - -[[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/docs/CreateOrganizationInterconnectionRequest.md b/services/metalv1/docs/CreateOrganizationInterconnectionRequest.md index bcde6793..7ef85a9a 100644 --- a/services/metalv1/docs/CreateOrganizationInterconnectionRequest.md +++ b/services/metalv1/docs/CreateOrganizationInterconnectionRequest.md @@ -7,7 +7,6 @@ Name | Type | Description | Notes **BillingAccountName** | Pointer to **string** | The billing account name of the Equinix Fabric account. | [optional] **ContactEmail** | Pointer to **string** | The preferred email used for communication and notifications about the Equinix Fabric interconnection. Optional and defaults to the primary user email address when using a User API key or the organization owner email address when using a Project API key. | [optional] **Description** | Pointer to **string** | | [optional] -**FacilityId** | Pointer to **string** | | [optional] **Metro** | **string** | A Metro ID or code. When creating Fabric VCs (Metal Billed), this is where interconnection will be originating from, as we pre-authorize the use of one of our shared ports as the origin of the interconnection using A-Side service tokens. We only allow local connections for Fabric VCs (Metal Billed), so the destination location must be the same as the origin. For Fabric VCs (Fabric Billed), or shared connections, this will be the destination of the interconnection. We allow remote connections for Fabric VCs (Fabric Billed), so the origin of the interconnection can be a different metro set here. | **Mode** | Pointer to [**DedicatedPortCreateInputMode**](DedicatedPortCreateInputMode.md) | | [optional] **Name** | **string** | | @@ -116,31 +115,6 @@ SetDescription sets Description field to given value. HasDescription returns a boolean if a field has been set. -### GetFacilityId - -`func (o *CreateOrganizationInterconnectionRequest) GetFacilityId() string` - -GetFacilityId returns the FacilityId field if non-nil, zero value otherwise. - -### GetFacilityIdOk - -`func (o *CreateOrganizationInterconnectionRequest) GetFacilityIdOk() (*string, bool)` - -GetFacilityIdOk returns a tuple with the FacilityId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetFacilityId - -`func (o *CreateOrganizationInterconnectionRequest) SetFacilityId(v string)` - -SetFacilityId sets FacilityId field to given value. - -### HasFacilityId - -`func (o *CreateOrganizationInterconnectionRequest) HasFacilityId() bool` - -HasFacilityId returns a boolean if a field has been set. - ### GetMetro `func (o *CreateOrganizationInterconnectionRequest) GetMetro() string` diff --git a/services/metalv1/docs/DedicatedPortCreateInput.md b/services/metalv1/docs/DedicatedPortCreateInput.md index 3a9c0430..a4515b8f 100644 --- a/services/metalv1/docs/DedicatedPortCreateInput.md +++ b/services/metalv1/docs/DedicatedPortCreateInput.md @@ -7,7 +7,6 @@ Name | Type | Description | Notes **BillingAccountName** | Pointer to **string** | The billing account name of the Equinix Fabric account. | [optional] **ContactEmail** | Pointer to **string** | The preferred email used for communication and notifications about the Equinix Fabric interconnection. Optional and defaults to the primary user email address when using a User API key or the organization owner email address when using a Project API key. | [optional] **Description** | Pointer to **string** | | [optional] -**FacilityId** | Pointer to **string** | | [optional] **Metro** | **string** | A Metro ID or code. For interconnections with Dedicated Ports, this will be the location of the issued Dedicated Ports. | **Mode** | Pointer to [**DedicatedPortCreateInputMode**](DedicatedPortCreateInputMode.md) | | [optional] **Name** | **string** | | @@ -112,31 +111,6 @@ SetDescription sets Description field to given value. HasDescription returns a boolean if a field has been set. -### GetFacilityId - -`func (o *DedicatedPortCreateInput) GetFacilityId() string` - -GetFacilityId returns the FacilityId field if non-nil, zero value otherwise. - -### GetFacilityIdOk - -`func (o *DedicatedPortCreateInput) GetFacilityIdOk() (*string, bool)` - -GetFacilityIdOk returns a tuple with the FacilityId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetFacilityId - -`func (o *DedicatedPortCreateInput) SetFacilityId(v string)` - -SetFacilityId sets FacilityId field to given value. - -### HasFacilityId - -`func (o *DedicatedPortCreateInput) HasFacilityId() bool` - -HasFacilityId returns a boolean if a field has been set. - ### GetMetro `func (o *DedicatedPortCreateInput) GetMetro() string` diff --git a/services/metalv1/docs/DeviceCreateInMetroInput.md b/services/metalv1/docs/DeviceCreateInMetroInput.md index 174677a2..3b4fa1b2 100644 --- a/services/metalv1/docs/DeviceCreateInMetroInput.md +++ b/services/metalv1/docs/DeviceCreateInMetroInput.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Metro** | **string** | Metro code or ID of where the device should be provisioned in, or it can be instructed to create the device in the best available metro with `{ \"metro\": \"any\" }`. The special metro value of any means anywhere, any metro. When any is chosen in the request, the metro location is picked per our scheduling algorithms that favor the following factors: hardware reservation location (if requesting reserved hardware), ip reservations, spot instances, etc. The any keyword *does not* optimize for cost, this means that usage costs (instance, transfer, other features dependent on location) will vary. Please check metro value in response to see where the device was created. Either metro or facility must be provided. | +**Metro** | [**MetroInputMetro**](MetroInputMetro.md) | | **AlwaysPxe** | Pointer to **bool** | When true, devices with a `custom_ipxe` OS will always boot to iPXE. The default setting of false ensures that iPXE will be used on only the first boot. | [optional] [default to false] **BillingCycle** | Pointer to [**DeviceCreateInputBillingCycle**](DeviceCreateInputBillingCycle.md) | | [optional] **Customdata** | Pointer to **map[string]interface{}** | Customdata is an arbitrary JSON value that can be accessed via the metadata service. | [optional] [default to {}] @@ -35,7 +35,7 @@ Name | Type | Description | Notes ### NewDeviceCreateInMetroInput -`func NewDeviceCreateInMetroInput(metro string, operatingSystem string, plan string, ) *DeviceCreateInMetroInput` +`func NewDeviceCreateInMetroInput(metro MetroInputMetro, operatingSystem string, plan string, ) *DeviceCreateInMetroInput` NewDeviceCreateInMetroInput instantiates a new DeviceCreateInMetroInput object This constructor will assign default values to properties that have it defined, @@ -52,20 +52,20 @@ but it doesn't guarantee that properties required by API are set ### GetMetro -`func (o *DeviceCreateInMetroInput) GetMetro() string` +`func (o *DeviceCreateInMetroInput) GetMetro() MetroInputMetro` GetMetro returns the Metro field if non-nil, zero value otherwise. ### GetMetroOk -`func (o *DeviceCreateInMetroInput) GetMetroOk() (*string, bool)` +`func (o *DeviceCreateInMetroInput) GetMetroOk() (*MetroInputMetro, bool)` GetMetroOk returns a tuple with the Metro field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetMetro -`func (o *DeviceCreateInMetroInput) SetMetro(v string)` +`func (o *DeviceCreateInMetroInput) SetMetro(v MetroInputMetro)` SetMetro sets Metro field to given value. diff --git a/services/metalv1/docs/DevicesApi.md b/services/metalv1/docs/DevicesApi.md index eb2155b2..db332675 100644 --- a/services/metalv1/docs/DevicesApi.md +++ b/services/metalv1/docs/DevicesApi.md @@ -103,7 +103,7 @@ Name | Type | Description | Notes ## CreateDevice -> Device CreateDevice(ctx, id).CreateDeviceRequest(createDeviceRequest).Include(include).Exclude(exclude).Execute() +> Device CreateDevice(ctx, id).DeviceCreateInMetroInput(deviceCreateInMetroInput).Include(include).Exclude(exclude).Execute() Create a device @@ -123,13 +123,13 @@ import ( func main() { id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Project UUID - createDeviceRequest := openapiclient.createDevice_request{DeviceCreateInFacilityInput: openapiclient.NewDeviceCreateInFacilityInput([]string{"Facility_example"}, "OperatingSystem_example", "c3.large.x86")} // CreateDeviceRequest | Device to create + deviceCreateInMetroInput := *openapiclient.NewDeviceCreateInMetroInput(*openapiclient.NewMetroInputMetro(), "OperatingSystem_example", "c3.large.x86") // DeviceCreateInMetroInput | Device to create 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) configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DevicesApi.CreateDevice(context.Background(), id).CreateDeviceRequest(createDeviceRequest).Include(include).Exclude(exclude).Execute() + resp, r, err := apiClient.DevicesApi.CreateDevice(context.Background(), id).DeviceCreateInMetroInput(deviceCreateInMetroInput).Include(include).Exclude(exclude).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `DevicesApi.CreateDevice``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -155,7 +155,7 @@ Other parameters are passed through a pointer to a apiCreateDeviceRequest struct Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **createDeviceRequest** | [**CreateDeviceRequest**](CreateDeviceRequest.md) | Device to create | + **deviceCreateInMetroInput** | [**DeviceCreateInMetroInput**](DeviceCreateInMetroInput.md) | Device to create | **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. | diff --git a/services/metalv1/docs/FacilitiesApi.md b/services/metalv1/docs/FacilitiesApi.md deleted file mode 100644 index 81bc9909..00000000 --- a/services/metalv1/docs/FacilitiesApi.md +++ /dev/null @@ -1,227 +0,0 @@ -# \FacilitiesApi - -All URIs are relative to *https://api.equinix.com/metal/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**FindFacilities**](FacilitiesApi.md#FindFacilities) | **Get** /facilities | Retrieve all facilities -[**FindFacilitiesByOrganization**](FacilitiesApi.md#FindFacilitiesByOrganization) | **Get** /organizations/{id}/facilities | Retrieve all facilities visible by the organization -[**FindFacilitiesByProject**](FacilitiesApi.md#FindFacilitiesByProject) | **Get** /projects/{id}/facilities | Retrieve all facilities visible by the project - - - -## FindFacilities - -> FacilityList FindFacilities(ctx).Include(include).Exclude(exclude).Execute() - -Retrieve all facilities - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/equinix/equinix-sdk-go/services/metalv1" -) - -func main() { - include := []openapiclient.FindFacilitiesIncludeParameterInner{openapiclient.findFacilities_include_parameter_inner("address")} // []FindFacilitiesIncludeParameterInner | Nested attributes 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 := []openapiclient.FindFacilitiesIncludeParameterInner{openapiclient.findFacilities_include_parameter_inner("address")} // []FindFacilitiesIncludeParameterInner | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) (default to [address]) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.FacilitiesApi.FindFacilities(context.Background()).Include(include).Exclude(exclude).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `FacilitiesApi.FindFacilities``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `FindFacilities`: FacilityList - fmt.Fprintf(os.Stdout, "Response from `FacilitiesApi.FindFacilities`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiFindFacilitiesRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **include** | [**[]FindFacilitiesIncludeParameterInner**](FindFacilitiesIncludeParameterInner.md) | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | - **exclude** | [**[]FindFacilitiesIncludeParameterInner**](FindFacilitiesIncludeParameterInner.md) | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. | [default to [address]] - -### Return type - -[**FacilityList**](FacilityList.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## FindFacilitiesByOrganization - -> FacilityList FindFacilitiesByOrganization(ctx, id).Include(include).Exclude(exclude).Execute() - -Retrieve all facilities visible by the organization - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/equinix/equinix-sdk-go/services/metalv1" -) - -func main() { - id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Organization UUID - 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) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.FacilitiesApi.FindFacilitiesByOrganization(context.Background(), id).Include(include).Exclude(exclude).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `FacilitiesApi.FindFacilitiesByOrganization``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `FindFacilitiesByOrganization`: FacilityList - fmt.Fprintf(os.Stdout, "Response from `FacilitiesApi.FindFacilitiesByOrganization`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**id** | **string** | Organization UUID | - -### Other Parameters - -Other parameters are passed through a pointer to a apiFindFacilitiesByOrganizationRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **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. | - -### Return type - -[**FacilityList**](FacilityList.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## FindFacilitiesByProject - -> FacilityList FindFacilitiesByProject(ctx, id).Include(include).Exclude(exclude).Execute() - -Retrieve all facilities visible by the project - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/equinix/equinix-sdk-go/services/metalv1" -) - -func main() { - id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Project UUID - 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) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.FacilitiesApi.FindFacilitiesByProject(context.Background(), id).Include(include).Exclude(exclude).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `FacilitiesApi.FindFacilitiesByProject``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `FindFacilitiesByProject`: FacilityList - fmt.Fprintf(os.Stdout, "Response from `FacilitiesApi.FindFacilitiesByProject`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**id** | **string** | Project UUID | - -### Other Parameters - -Other parameters are passed through a pointer to a apiFindFacilitiesByProjectRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **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. | - -### Return type - -[**FacilityList**](FacilityList.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/services/metalv1/docs/FindFacilitiesIncludeParameterInner.md b/services/metalv1/docs/FindFacilitiesIncludeParameterInner.md deleted file mode 100644 index d76fa665..00000000 --- a/services/metalv1/docs/FindFacilitiesIncludeParameterInner.md +++ /dev/null @@ -1,13 +0,0 @@ -# FindFacilitiesIncludeParameterInner - -## Enum - - -* `ADDRESS` (value: `"address"`) - -* `LABELS` (value: `"labels"`) - - -[[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/docs/FindOrganizationDevicesCategoriesParameterInner.md b/services/metalv1/docs/FindOrganizationDevicesCategoriesParameterInner.md index 7761b88a..ef0f378e 100644 --- a/services/metalv1/docs/FindOrganizationDevicesCategoriesParameterInner.md +++ b/services/metalv1/docs/FindOrganizationDevicesCategoriesParameterInner.md @@ -7,8 +7,6 @@ * `STORAGE` (value: `"storage"`) -* `VMCE` (value: `"vmce"`) - * `LEGACY_GEN` (value: `"legacy_gen"`) * `CURRENT_GEN` (value: `"current_gen"`) diff --git a/services/metalv1/docs/InstancesBatchCreateInputBatchesInner.md b/services/metalv1/docs/InstancesBatchCreateInputBatchesInner.md index e89ad011..91c0df82 100644 --- a/services/metalv1/docs/InstancesBatchCreateInputBatchesInner.md +++ b/services/metalv1/docs/InstancesBatchCreateInputBatchesInner.md @@ -4,9 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Hostnames** | Pointer to **[]string** | | [optional] -**Quantity** | Pointer to **int32** | The number of devices to create in this batch. The hostname may contain an `{{index}}` placeholder, which will be replaced with the index of the device in the batch. For example, if the hostname is `device-{{index}}`, the first device in the batch will have the hostname `device-01`, the second device will have the hostname `device-02`, and so on. | [optional] -**Metro** | **string** | Metro code or ID of where the device should be provisioned in, or it can be instructed to create the device in the best available metro with `{ \"metro\": \"any\" }`. The special metro value of any means anywhere, any metro. When any is chosen in the request, the metro location is picked per our scheduling algorithms that favor the following factors: hardware reservation location (if requesting reserved hardware), ip reservations, spot instances, etc. The any keyword *does not* optimize for cost, this means that usage costs (instance, transfer, other features dependent on location) will vary. Please check metro value in response to see where the device was created. Either metro or facility must be provided. | +**Metro** | [**MetroInputMetro**](MetroInputMetro.md) | | **AlwaysPxe** | Pointer to **bool** | When true, devices with a `custom_ipxe` OS will always boot to iPXE. The default setting of false ensures that iPXE will be used on only the first boot. | [optional] [default to false] **BillingCycle** | Pointer to [**DeviceCreateInputBillingCycle**](DeviceCreateInputBillingCycle.md) | | [optional] **Customdata** | Pointer to **map[string]interface{}** | Customdata is an arbitrary JSON value that can be accessed via the metadata service. | [optional] [default to {}] @@ -32,13 +30,14 @@ Name | Type | Description | Notes **TerminationTime** | Pointer to **time.Time** | When the device will be terminated. If you don't supply timezone info, the timestamp is assumed to be in UTC. This is commonly set in advance for ephemeral spot market instances but this field may also be set with on-demand and reservation instances to automatically delete the resource at a given time. The termination time can also be used to release a hardware reservation instance at a given time, keeping the reservation open for other uses. On a spot market device, the termination time will be set automatically when outbid. | [optional] **UserSshKeys** | Pointer to **[]string** | A list of UUIDs identifying the users that should be authorized to access this device (typically via /root/.ssh/authorized_keys). These keys will also appear in the device metadata. The users must be members of the project or organization. If no SSH keys are specified (`user_ssh_keys`, `project_ssh_keys`, and `ssh_keys` are all empty lists or omitted), all parent project keys, parent project members keys and organization members keys will be included. This behaviour can be changed with 'no_ssh_keys' option to omit any SSH key being added. | [optional] **Userdata** | Pointer to **string** | The userdata presented in the metadata service for this device. Userdata is fetched and interpreted by the operating system installed on the device. Acceptable formats are determined by the operating system, with the exception of a special iPXE enabling syntax which is handled before the operating system starts. See [Server User Data](https://deploy.equinix.com/developers/docs/metal/server-metadata/user-data/) and [Provisioning with Custom iPXE](https://deploy.equinix.com/developers/docs/metal/operating-systems/custom-ipxe/#provisioning-with-custom-ipxe) for more details. | [optional] -**Facility** | **[]string** | The datacenter where the device should be created. Either metro or facility must be provided. The API will accept either a single facility `{ \"facility\": \"f1\" }`, or it can be instructed to create the device in the best available datacenter `{ \"facility\": \"any\" }`. Additionally it is possible to set a prioritized location selection. For example `{ \"facility\": [\"f3\", \"f2\", \"any\"] }` can be used to prioritize `f3` and then `f2` before accepting `any` facility. If none of the facilities provided have availability for the requested device the request will fail. | +**Hostnames** | Pointer to **[]string** | | [optional] +**Quantity** | Pointer to **int32** | The number of devices to create in this batch. The hostname may contain an `{{index}}` placeholder, which will be replaced with the index of the device in the batch. For example, if the hostname is `device-{{index}}`, the first device in the batch will have the hostname `device-01`, the second device will have the hostname `device-02`, and so on. | [optional] ## Methods ### NewInstancesBatchCreateInputBatchesInner -`func NewInstancesBatchCreateInputBatchesInner(metro string, operatingSystem string, plan string, facility []string, ) *InstancesBatchCreateInputBatchesInner` +`func NewInstancesBatchCreateInputBatchesInner(metro MetroInputMetro, operatingSystem string, plan string, ) *InstancesBatchCreateInputBatchesInner` NewInstancesBatchCreateInputBatchesInner instantiates a new InstancesBatchCreateInputBatchesInner object This constructor will assign default values to properties that have it defined, @@ -53,72 +52,22 @@ NewInstancesBatchCreateInputBatchesInnerWithDefaults instantiates a new Instance This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set -### GetHostnames - -`func (o *InstancesBatchCreateInputBatchesInner) GetHostnames() []string` - -GetHostnames returns the Hostnames field if non-nil, zero value otherwise. - -### GetHostnamesOk - -`func (o *InstancesBatchCreateInputBatchesInner) GetHostnamesOk() (*[]string, bool)` - -GetHostnamesOk returns a tuple with the Hostnames field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetHostnames - -`func (o *InstancesBatchCreateInputBatchesInner) SetHostnames(v []string)` - -SetHostnames sets Hostnames field to given value. - -### HasHostnames - -`func (o *InstancesBatchCreateInputBatchesInner) HasHostnames() bool` - -HasHostnames returns a boolean if a field has been set. - -### GetQuantity - -`func (o *InstancesBatchCreateInputBatchesInner) GetQuantity() int32` - -GetQuantity returns the Quantity field if non-nil, zero value otherwise. - -### GetQuantityOk - -`func (o *InstancesBatchCreateInputBatchesInner) GetQuantityOk() (*int32, bool)` - -GetQuantityOk returns a tuple with the Quantity field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetQuantity - -`func (o *InstancesBatchCreateInputBatchesInner) SetQuantity(v int32)` - -SetQuantity sets Quantity field to given value. - -### HasQuantity - -`func (o *InstancesBatchCreateInputBatchesInner) HasQuantity() bool` - -HasQuantity returns a boolean if a field has been set. - ### GetMetro -`func (o *InstancesBatchCreateInputBatchesInner) GetMetro() string` +`func (o *InstancesBatchCreateInputBatchesInner) GetMetro() MetroInputMetro` GetMetro returns the Metro field if non-nil, zero value otherwise. ### GetMetroOk -`func (o *InstancesBatchCreateInputBatchesInner) GetMetroOk() (*string, bool)` +`func (o *InstancesBatchCreateInputBatchesInner) GetMetroOk() (*MetroInputMetro, bool)` GetMetroOk returns a tuple with the Metro field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetMetro -`func (o *InstancesBatchCreateInputBatchesInner) SetMetro(v string)` +`func (o *InstancesBatchCreateInputBatchesInner) SetMetro(v MetroInputMetro)` SetMetro sets Metro field to given value. @@ -738,25 +687,55 @@ SetUserdata sets Userdata field to given value. HasUserdata returns a boolean if a field has been set. -### GetFacility +### GetHostnames + +`func (o *InstancesBatchCreateInputBatchesInner) GetHostnames() []string` + +GetHostnames returns the Hostnames field if non-nil, zero value otherwise. + +### GetHostnamesOk + +`func (o *InstancesBatchCreateInputBatchesInner) GetHostnamesOk() (*[]string, bool)` + +GetHostnamesOk returns a tuple with the Hostnames field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHostnames + +`func (o *InstancesBatchCreateInputBatchesInner) SetHostnames(v []string)` + +SetHostnames sets Hostnames field to given value. + +### HasHostnames + +`func (o *InstancesBatchCreateInputBatchesInner) HasHostnames() bool` + +HasHostnames returns a boolean if a field has been set. -`func (o *InstancesBatchCreateInputBatchesInner) GetFacility() []string` +### GetQuantity -GetFacility returns the Facility field if non-nil, zero value otherwise. +`func (o *InstancesBatchCreateInputBatchesInner) GetQuantity() int32` -### GetFacilityOk +GetQuantity returns the Quantity field if non-nil, zero value otherwise. -`func (o *InstancesBatchCreateInputBatchesInner) GetFacilityOk() (*[]string, bool)` +### GetQuantityOk -GetFacilityOk returns a tuple with the Facility field if it's non-nil, zero value otherwise +`func (o *InstancesBatchCreateInputBatchesInner) GetQuantityOk() (*int32, bool)` + +GetQuantityOk returns a tuple with the Quantity field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### SetFacility +### SetQuantity -`func (o *InstancesBatchCreateInputBatchesInner) SetFacility(v []string)` +`func (o *InstancesBatchCreateInputBatchesInner) SetQuantity(v int32)` -SetFacility sets Facility field to given value. +SetQuantity sets Quantity field to given value. +### HasQuantity + +`func (o *InstancesBatchCreateInputBatchesInner) HasQuantity() bool` + +HasQuantity 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/services/metalv1/docs/Interconnection.md b/services/metalv1/docs/Interconnection.md index 930b1b84..0a51f12f 100644 --- a/services/metalv1/docs/Interconnection.md +++ b/services/metalv1/docs/Interconnection.md @@ -6,7 +6,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **ContactEmail** | Pointer to **string** | | [optional] **Description** | Pointer to **string** | | [optional] -**Facility** | Pointer to [**Facility**](Facility.md) | | [optional] **Id** | Pointer to **string** | | [optional] **Metro** | Pointer to [**Metro**](Metro.md) | | [optional] **Mode** | Pointer to [**InterconnectionMode**](InterconnectionMode.md) | | [optional] @@ -96,31 +95,6 @@ SetDescription sets Description field to given value. HasDescription returns a boolean if a field has been set. -### GetFacility - -`func (o *Interconnection) GetFacility() Facility` - -GetFacility returns the Facility field if non-nil, zero value otherwise. - -### GetFacilityOk - -`func (o *Interconnection) GetFacilityOk() (*Facility, bool)` - -GetFacilityOk returns a tuple with the Facility field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetFacility - -`func (o *Interconnection) SetFacility(v Facility)` - -SetFacility sets Facility field to given value. - -### HasFacility - -`func (o *Interconnection) HasFacility() bool` - -HasFacility returns a boolean if a field has been set. - ### GetId `func (o *Interconnection) GetId() string` diff --git a/services/metalv1/docs/InterconnectionsApi.md b/services/metalv1/docs/InterconnectionsApi.md index b092f77f..0d0ef2bb 100644 --- a/services/metalv1/docs/InterconnectionsApi.md +++ b/services/metalv1/docs/InterconnectionsApi.md @@ -17,8 +17,8 @@ Method | HTTP request | Description [**ListInterconnectionPortVirtualCircuits**](InterconnectionsApi.md#ListInterconnectionPortVirtualCircuits) | **Get** /connections/{connection_id}/ports/{port_id}/virtual-circuits | List a interconnection port's virtual circuits [**ListInterconnectionPorts**](InterconnectionsApi.md#ListInterconnectionPorts) | **Get** /connections/{connection_id}/ports | List a interconnection's ports [**ListInterconnectionVirtualCircuits**](InterconnectionsApi.md#ListInterconnectionVirtualCircuits) | **Get** /connections/{connection_id}/virtual-circuits | List a interconnection's virtual circuits -[**OrganizationListInterconnections**](InterconnectionsApi.md#OrganizationListInterconnections) | **Get** /organizations/{organization_id}/connections | List organization connections -[**ProjectListInterconnections**](InterconnectionsApi.md#ProjectListInterconnections) | **Get** /projects/{project_id}/connections | List project connections +[**OrganizationListInterconnections**](InterconnectionsApi.md#OrganizationListInterconnections) | **Get** /organizations/{organization_id}/connections | List an Organization's interconnections +[**ProjectListInterconnections**](InterconnectionsApi.md#ProjectListInterconnections) | **Get** /projects/{project_id}/connections | List a Project's and Organization's interconnections [**UpdateInterconnection**](InterconnectionsApi.md#UpdateInterconnection) | **Put** /connections/{connection_id} | Update interconnection [**UpdateVirtualCircuit**](InterconnectionsApi.md#UpdateVirtualCircuit) | **Put** /virtual-circuits/{id} | Update a virtual circuit @@ -965,9 +965,9 @@ Name | Type | Description | Notes ## OrganizationListInterconnections -> InterconnectionList OrganizationListInterconnections(ctx, organizationId).Include(include).Exclude(exclude).Execute() +> InterconnectionList OrganizationListInterconnections(ctx, organizationId).Include(include).Exclude(exclude).ProjectprojectId(projectprojectId).Execute() -List organization connections +List an Organization's interconnections @@ -987,10 +987,11 @@ func main() { organizationId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | UUID of the organization 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) + projectprojectId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Filter the list to return only the interconnections for the specified Project. (optional) configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.InterconnectionsApi.OrganizationListInterconnections(context.Background(), organizationId).Include(include).Exclude(exclude).Execute() + resp, r, err := apiClient.InterconnectionsApi.OrganizationListInterconnections(context.Background(), organizationId).Include(include).Exclude(exclude).ProjectprojectId(projectprojectId).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `InterconnectionsApi.OrganizationListInterconnections``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -1018,6 +1019,7 @@ Name | Type | Description | Notes **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. | + **projectprojectId** | **string** | Filter the list to return only the interconnections for the specified Project. | ### Return type @@ -1041,7 +1043,7 @@ Name | Type | Description | Notes > InterconnectionList ProjectListInterconnections(ctx, projectId).Include(include).Exclude(exclude).Page(page).PerPage(perPage).Execute() -List project connections +List a Project's and Organization's interconnections ProjectListInterconnections is a paginated API operation. You can specify page number and per page parameters with `Execute`, or to fetch and return all pages of results as a single slice you can call `ExecuteWithPagination()`. `ExecuteWithPagination()`, while convenient, can significantly increase the overhead of API calls in terms of time, network utilization, and memory. Excludes can make the call more efficient by removing any unneeded nested fields that are included by default. If any of the requests fail, the list of results will be nil and the error returned will represent the failed request. diff --git a/services/metalv1/docs/Invitation.md b/services/metalv1/docs/Invitation.md index 9de553bb..7d691aa6 100644 --- a/services/metalv1/docs/Invitation.md +++ b/services/metalv1/docs/Invitation.md @@ -15,6 +15,7 @@ Name | Type | Description | Notes **Projects** | Pointer to [**[]Href**](Href.md) | | [optional] **Roles** | Pointer to [**[]InvitationRolesInner**](InvitationRolesInner.md) | | [optional] **UpdatedAt** | Pointer to **time.Time** | | [optional] +**BoundRoles** | Pointer to **[]string** | | [optional] ## Methods @@ -310,6 +311,31 @@ SetUpdatedAt sets UpdatedAt field to given value. HasUpdatedAt returns a boolean if a field has been set. +### GetBoundRoles + +`func (o *Invitation) GetBoundRoles() []string` + +GetBoundRoles returns the BoundRoles field if non-nil, zero value otherwise. + +### GetBoundRolesOk + +`func (o *Invitation) GetBoundRolesOk() (*[]string, bool)` + +GetBoundRolesOk returns a tuple with the BoundRoles field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBoundRoles + +`func (o *Invitation) SetBoundRoles(v []string)` + +SetBoundRoles sets BoundRoles field to given value. + +### HasBoundRoles + +`func (o *Invitation) HasBoundRoles() bool` + +HasBoundRoles 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/services/metalv1/docs/InvitationInput.md b/services/metalv1/docs/InvitationInput.md index 99915779..6a5e4164 100644 --- a/services/metalv1/docs/InvitationInput.md +++ b/services/metalv1/docs/InvitationInput.md @@ -9,6 +9,7 @@ Name | Type | Description | Notes **OrganizationId** | Pointer to **string** | | [optional] **ProjectsIds** | Pointer to **[]string** | | [optional] **Roles** | Pointer to [**[]InvitationRolesInner**](InvitationRolesInner.md) | | [optional] +**BoundRoles** | Pointer to **[]string** | | [optional] ## Methods @@ -149,6 +150,31 @@ SetRoles sets Roles field to given value. HasRoles returns a boolean if a field has been set. +### GetBoundRoles + +`func (o *InvitationInput) GetBoundRoles() []string` + +GetBoundRoles returns the BoundRoles field if non-nil, zero value otherwise. + +### GetBoundRolesOk + +`func (o *InvitationInput) GetBoundRolesOk() (*[]string, bool)` + +GetBoundRolesOk returns a tuple with the BoundRoles field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBoundRoles + +`func (o *InvitationInput) SetBoundRoles(v []string)` + +SetBoundRoles sets BoundRoles field to given value. + +### HasBoundRoles + +`func (o *InvitationInput) HasBoundRoles() bool` + +HasBoundRoles 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/services/metalv1/docs/Member.md b/services/metalv1/docs/Member.md new file mode 100644 index 00000000..8d52210f --- /dev/null +++ b/services/metalv1/docs/Member.md @@ -0,0 +1,238 @@ +# Member + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | Pointer to **string** | | [optional] +**Roles** | Pointer to [**[]InvitationRolesInner**](InvitationRolesInner.md) | | [optional] +**ProjectsCount** | Pointer to **int32** | | [optional] +**BoundRoles** | Pointer to **[]string** | | [optional] +**User** | Pointer to [**Href**](Href.md) | | [optional] +**Organization** | Pointer to [**Href**](Href.md) | | [optional] +**Projects** | Pointer to [**[]Href**](Href.md) | | [optional] +**Href** | Pointer to **string** | | [optional] + +## Methods + +### NewMember + +`func NewMember() *Member` + +NewMember instantiates a new Member object +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 + +### NewMemberWithDefaults + +`func NewMemberWithDefaults() *Member` + +NewMemberWithDefaults instantiates a new Member object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *Member) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *Member) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *Member) SetId(v string)` + +SetId sets Id field to given value. + +### HasId + +`func (o *Member) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetRoles + +`func (o *Member) GetRoles() []InvitationRolesInner` + +GetRoles returns the Roles field if non-nil, zero value otherwise. + +### GetRolesOk + +`func (o *Member) GetRolesOk() (*[]InvitationRolesInner, bool)` + +GetRolesOk returns a tuple with the Roles field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRoles + +`func (o *Member) SetRoles(v []InvitationRolesInner)` + +SetRoles sets Roles field to given value. + +### HasRoles + +`func (o *Member) HasRoles() bool` + +HasRoles returns a boolean if a field has been set. + +### GetProjectsCount + +`func (o *Member) GetProjectsCount() int32` + +GetProjectsCount returns the ProjectsCount field if non-nil, zero value otherwise. + +### GetProjectsCountOk + +`func (o *Member) GetProjectsCountOk() (*int32, bool)` + +GetProjectsCountOk returns a tuple with the ProjectsCount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetProjectsCount + +`func (o *Member) SetProjectsCount(v int32)` + +SetProjectsCount sets ProjectsCount field to given value. + +### HasProjectsCount + +`func (o *Member) HasProjectsCount() bool` + +HasProjectsCount returns a boolean if a field has been set. + +### GetBoundRoles + +`func (o *Member) GetBoundRoles() []string` + +GetBoundRoles returns the BoundRoles field if non-nil, zero value otherwise. + +### GetBoundRolesOk + +`func (o *Member) GetBoundRolesOk() (*[]string, bool)` + +GetBoundRolesOk returns a tuple with the BoundRoles field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBoundRoles + +`func (o *Member) SetBoundRoles(v []string)` + +SetBoundRoles sets BoundRoles field to given value. + +### HasBoundRoles + +`func (o *Member) HasBoundRoles() bool` + +HasBoundRoles returns a boolean if a field has been set. + +### GetUser + +`func (o *Member) GetUser() Href` + +GetUser returns the User field if non-nil, zero value otherwise. + +### GetUserOk + +`func (o *Member) GetUserOk() (*Href, bool)` + +GetUserOk returns a tuple with the User field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUser + +`func (o *Member) SetUser(v Href)` + +SetUser sets User field to given value. + +### HasUser + +`func (o *Member) HasUser() bool` + +HasUser returns a boolean if a field has been set. + +### GetOrganization + +`func (o *Member) GetOrganization() Href` + +GetOrganization returns the Organization field if non-nil, zero value otherwise. + +### GetOrganizationOk + +`func (o *Member) GetOrganizationOk() (*Href, bool)` + +GetOrganizationOk returns a tuple with the Organization field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOrganization + +`func (o *Member) SetOrganization(v Href)` + +SetOrganization sets Organization field to given value. + +### HasOrganization + +`func (o *Member) HasOrganization() bool` + +HasOrganization returns a boolean if a field has been set. + +### GetProjects + +`func (o *Member) GetProjects() []Href` + +GetProjects returns the Projects field if non-nil, zero value otherwise. + +### GetProjectsOk + +`func (o *Member) GetProjectsOk() (*[]Href, bool)` + +GetProjectsOk returns a tuple with the Projects field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetProjects + +`func (o *Member) SetProjects(v []Href)` + +SetProjects sets Projects field to given value. + +### HasProjects + +`func (o *Member) HasProjects() bool` + +HasProjects returns a boolean if a field has been set. + +### GetHref + +`func (o *Member) GetHref() string` + +GetHref returns the Href field if non-nil, zero value otherwise. + +### GetHrefOk + +`func (o *Member) GetHrefOk() (*string, bool)` + +GetHrefOk returns a tuple with the Href field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHref + +`func (o *Member) SetHref(v string)` + +SetHref sets Href field to given value. + +### HasHref + +`func (o *Member) HasHref() bool` + +HasHref 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/services/metalv1/docs/MemberList.md b/services/metalv1/docs/MemberList.md new file mode 100644 index 00000000..9a0bf249 --- /dev/null +++ b/services/metalv1/docs/MemberList.md @@ -0,0 +1,56 @@ +# MemberList + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Members** | Pointer to [**[]Member**](Member.md) | | [optional] + +## Methods + +### NewMemberList + +`func NewMemberList() *MemberList` + +NewMemberList instantiates a new MemberList object +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 + +### NewMemberListWithDefaults + +`func NewMemberListWithDefaults() *MemberList` + +NewMemberListWithDefaults instantiates a new MemberList object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetMembers + +`func (o *MemberList) GetMembers() []Member` + +GetMembers returns the Members field if non-nil, zero value otherwise. + +### GetMembersOk + +`func (o *MemberList) GetMembersOk() (*[]Member, bool)` + +GetMembersOk returns a tuple with the Members field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMembers + +`func (o *MemberList) SetMembers(v []Member)` + +SetMembers sets Members field to given value. + +### HasMembers + +`func (o *MemberList) HasMembers() bool` + +HasMembers 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/services/metalv1/docs/MemberUpdateInput.md b/services/metalv1/docs/MemberUpdateInput.md new file mode 100644 index 00000000..65fa1b70 --- /dev/null +++ b/services/metalv1/docs/MemberUpdateInput.md @@ -0,0 +1,108 @@ +# MemberUpdateInput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Role** | Pointer to [**[]InvitationRolesInner**](InvitationRolesInner.md) | Primary role for the user within the organization | [optional] +**BoundRoles** | Pointer to **[]string** | Additional roles that can be bound to the user to grant extra permissions. | [optional] +**ProjectIds** | Pointer to **[]string** | Project IDs the user should be able to access. This field is only required when role is set to `collaborator` or `limited_collaborator`. | [optional] + +## Methods + +### NewMemberUpdateInput + +`func NewMemberUpdateInput() *MemberUpdateInput` + +NewMemberUpdateInput instantiates a new MemberUpdateInput object +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 + +### NewMemberUpdateInputWithDefaults + +`func NewMemberUpdateInputWithDefaults() *MemberUpdateInput` + +NewMemberUpdateInputWithDefaults instantiates a new MemberUpdateInput object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetRole + +`func (o *MemberUpdateInput) GetRole() []InvitationRolesInner` + +GetRole returns the Role field if non-nil, zero value otherwise. + +### GetRoleOk + +`func (o *MemberUpdateInput) GetRoleOk() (*[]InvitationRolesInner, bool)` + +GetRoleOk returns a tuple with the Role field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRole + +`func (o *MemberUpdateInput) SetRole(v []InvitationRolesInner)` + +SetRole sets Role field to given value. + +### HasRole + +`func (o *MemberUpdateInput) HasRole() bool` + +HasRole returns a boolean if a field has been set. + +### GetBoundRoles + +`func (o *MemberUpdateInput) GetBoundRoles() []string` + +GetBoundRoles returns the BoundRoles field if non-nil, zero value otherwise. + +### GetBoundRolesOk + +`func (o *MemberUpdateInput) GetBoundRolesOk() (*[]string, bool)` + +GetBoundRolesOk returns a tuple with the BoundRoles field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBoundRoles + +`func (o *MemberUpdateInput) SetBoundRoles(v []string)` + +SetBoundRoles sets BoundRoles field to given value. + +### HasBoundRoles + +`func (o *MemberUpdateInput) HasBoundRoles() bool` + +HasBoundRoles returns a boolean if a field has been set. + +### GetProjectIds + +`func (o *MemberUpdateInput) GetProjectIds() []string` + +GetProjectIds returns the ProjectIds field if non-nil, zero value otherwise. + +### GetProjectIdsOk + +`func (o *MemberUpdateInput) GetProjectIdsOk() (*[]string, bool)` + +GetProjectIdsOk returns a tuple with the ProjectIds field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetProjectIds + +`func (o *MemberUpdateInput) SetProjectIds(v []string)` + +SetProjectIds sets ProjectIds field to given value. + +### HasProjectIds + +`func (o *MemberUpdateInput) HasProjectIds() bool` + +HasProjectIds 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/services/metalv1/docs/Membership.md b/services/metalv1/docs/Membership.md index 8fd6cc79..2f2b82a5 100644 --- a/services/metalv1/docs/Membership.md +++ b/services/metalv1/docs/Membership.md @@ -11,6 +11,7 @@ Name | Type | Description | Notes **Roles** | Pointer to **[]string** | | [optional] **UpdatedAt** | Pointer to **time.Time** | | [optional] **User** | Pointer to [**Href**](Href.md) | | [optional] +**BoundRoles** | Pointer to **[]string** | | [optional] ## Methods @@ -206,6 +207,31 @@ SetUser sets User field to given value. HasUser returns a boolean if a field has been set. +### GetBoundRoles + +`func (o *Membership) GetBoundRoles() []string` + +GetBoundRoles returns the BoundRoles field if non-nil, zero value otherwise. + +### GetBoundRolesOk + +`func (o *Membership) GetBoundRolesOk() (*[]string, bool)` + +GetBoundRolesOk returns a tuple with the BoundRoles field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBoundRoles + +`func (o *Membership) SetBoundRoles(v []string)` + +SetBoundRoles sets BoundRoles field to given value. + +### HasBoundRoles + +`func (o *Membership) HasBoundRoles() bool` + +HasBoundRoles 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/services/metalv1/docs/MetroInput.md b/services/metalv1/docs/MetroInput.md index 0eb06d97..74fd41ee 100644 --- a/services/metalv1/docs/MetroInput.md +++ b/services/metalv1/docs/MetroInput.md @@ -4,13 +4,13 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Metro** | **string** | Metro code or ID of where the device should be provisioned in, or it can be instructed to create the device in the best available metro with `{ \"metro\": \"any\" }`. The special metro value of any means anywhere, any metro. When any is chosen in the request, the metro location is picked per our scheduling algorithms that favor the following factors: hardware reservation location (if requesting reserved hardware), ip reservations, spot instances, etc. The any keyword *does not* optimize for cost, this means that usage costs (instance, transfer, other features dependent on location) will vary. Please check metro value in response to see where the device was created. Either metro or facility must be provided. | +**Metro** | [**MetroInputMetro**](MetroInputMetro.md) | | ## Methods ### NewMetroInput -`func NewMetroInput(metro string, ) *MetroInput` +`func NewMetroInput(metro MetroInputMetro, ) *MetroInput` NewMetroInput instantiates a new MetroInput object This constructor will assign default values to properties that have it defined, @@ -27,20 +27,20 @@ but it doesn't guarantee that properties required by API are set ### GetMetro -`func (o *MetroInput) GetMetro() string` +`func (o *MetroInput) GetMetro() MetroInputMetro` GetMetro returns the Metro field if non-nil, zero value otherwise. ### GetMetroOk -`func (o *MetroInput) GetMetroOk() (*string, bool)` +`func (o *MetroInput) GetMetroOk() (*MetroInputMetro, bool)` GetMetroOk returns a tuple with the Metro field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetMetro -`func (o *MetroInput) SetMetro(v string)` +`func (o *MetroInput) SetMetro(v MetroInputMetro)` SetMetro sets Metro field to given value. diff --git a/services/metalv1/docs/MetroInputMetro.md b/services/metalv1/docs/MetroInputMetro.md new file mode 100644 index 00000000..a8f36a0b --- /dev/null +++ b/services/metalv1/docs/MetroInputMetro.md @@ -0,0 +1,30 @@ +# MetroInputMetro + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Methods + +### NewMetroInputMetro + +`func NewMetroInputMetro() *MetroInputMetro` + +NewMetroInputMetro instantiates a new MetroInputMetro object +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 + +### NewMetroInputMetroWithDefaults + +`func NewMetroInputMetroWithDefaults() *MetroInputMetro` + +NewMetroInputMetroWithDefaults instantiates a new MetroInputMetro object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are 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/services/metalv1/docs/OperatingSystem.md b/services/metalv1/docs/OperatingSystem.md index d7d774cf..a1353dc8 100644 --- a/services/metalv1/docs/OperatingSystem.md +++ b/services/metalv1/docs/OperatingSystem.md @@ -4,21 +4,21 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**BuildDate** | Pointer to **string** | The date on which the current OS image was build and released | [optional] -**DeprecationDate** | Pointer to **string** | The date when the OS is deprecated | [optional] +**BuildDate** | Pointer to **string** | The date when Metal's current OS image was built and released. | [optional] +**DeprecationDate** | Pointer to **string** | The date when the OS is deprecated. This is the date set by the upstream operating system maintainer. | [optional] **Distro** | Pointer to **string** | | [optional] **DistroLabel** | Pointer to **string** | | [optional] -**EndOfLifeDate** | Pointer to **string** | The OS no longer receives any updates and may be disabled at any time | [optional] -**EndOfServiceDate** | Pointer to **string** | When the OS is nearing end of life, typically 30 days before end of life | [optional] +**EndOfLifeDate** | Pointer to **string** | The date when the Metal OS image no longer receives any updates and may be disabled at any time. Typically the same as the deprecation date set by the upstream OS maintainers. | [optional] +**EndOfServiceDate** | Pointer to **string** | Metal-set date for when the OS is nearing end of life, typically 30 days before end of life. | [optional] **Id** | Pointer to **string** | | [optional] -**Licensed** | Pointer to **bool** | Licenced OS is priced according to pricing property | [optional] -**LifecycleState** | Pointer to **string** | Where in the support lifecycle the OS is | [optional] +**Licensed** | Pointer to **bool** | Indicates if the OS is licensed or not. Licensed operating systems are priced according to pricing property. | [optional] +**LifecycleState** | Pointer to **string** | Where in the lifecycle the OS image is. Possible states are - `\"testing\"`, `\"pre_release\"`, `\"active\"`, `\"deprecated\"`, `\"end_of_service\"`, or `\"end_of_life\"`. | [optional] **Name** | Pointer to **string** | | [optional] -**Preinstallable** | Pointer to **bool** | Servers can be already preinstalled with OS in order to shorten provision time. | [optional] -**Pricing** | Pointer to **map[string]interface{}** | This object contains price per time unit and optional multiplier value if licence price depends on hardware plan or components (e.g. number of cores) | [optional] +**Preinstallable** | Pointer to **bool** | Indicates whether servers can be preinstalled with OS image in order to shorten provision time. | [optional] +**Pricing** | Pointer to **map[string]interface{}** | This object contains price per time unit and optional multiplier value if license price depends on hardware plan or components (e.g. number of cores). | [optional] **ProvisionableOn** | Pointer to **[]string** | | [optional] -**ReleaseDate** | Pointer to **string** | The date when the OS was released | [optional] -**ReleaseNotes** | Pointer to **string** | The current release notes for this OS image, typically in Markdown format | [optional] +**ReleaseDate** | Pointer to **string** | The date the upstream operating system maintainer released this version of the OS. | [optional] +**ReleaseNotes** | Pointer to **string** | The current release notes for this OS image, typically in Markdown format. | [optional] **Slug** | Pointer to **string** | | [optional] **Version** | Pointer to **string** | | [optional] **DefaultOperatingSystem** | Pointer to **bool** | Default operating system for the distro. | [optional] [readonly] diff --git a/services/metalv1/docs/OrganizationsApi.md b/services/metalv1/docs/OrganizationsApi.md index cbbcc806..ace20156 100644 --- a/services/metalv1/docs/OrganizationsApi.md +++ b/services/metalv1/docs/OrganizationsApi.md @@ -4,7 +4,6 @@ All URIs are relative to *https://api.equinix.com/metal/v1* Method | HTTP request | Description ------------- | ------------- | ------------- -[**CreateOrganization**](OrganizationsApi.md#CreateOrganization) | **Post** /organizations | Create an organization [**CreateOrganizationInvitation**](OrganizationsApi.md#CreateOrganizationInvitation) | **Post** /organizations/{id}/invitations | Create an invitation for an organization [**CreateOrganizationProject**](OrganizationsApi.md#CreateOrganizationProject) | **Post** /organizations/{id}/projects | Create a project for the organization [**CreatePaymentMethod**](OrganizationsApi.md#CreatePaymentMethod) | **Post** /organizations/{id}/payment-methods | Create a payment method for the given organization @@ -18,80 +17,13 @@ Method | HTTP request | Description [**FindOrganizationTransfers**](OrganizationsApi.md#FindOrganizationTransfers) | **Get** /organizations/{id}/transfers | Retrieve all project transfer requests from or to an organization [**FindOrganizations**](OrganizationsApi.md#FindOrganizations) | **Get** /organizations | Retrieve all organizations [**FindPlansByOrganization**](OrganizationsApi.md#FindPlansByOrganization) | **Get** /organizations/{id}/plans | Retrieve all plans visible by the organization +[**GetOrganizationMembers**](OrganizationsApi.md#GetOrganizationMembers) | **Get** /organizations/{organization_id}/members | Retrieve organization members +[**RemoveOrganizationMember**](OrganizationsApi.md#RemoveOrganizationMember) | **Delete** /organizations/{organization_id}/members/{id} | Remove member from the organization [**UpdateOrganization**](OrganizationsApi.md#UpdateOrganization) | **Put** /organizations/{id} | Update the organization +[**UpdateOrganizationMemberRoles**](OrganizationsApi.md#UpdateOrganizationMemberRoles) | **Put** /organizations/{organization_id}/members/{id} | Update roles for an organization member -## CreateOrganization - -> Organization CreateOrganization(ctx).OrganizationInput(organizationInput).Include(include).Exclude(exclude).Execute() - -Create an organization - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/equinix/equinix-sdk-go/services/metalv1" -) - -func main() { - organizationInput := *openapiclient.NewOrganizationInput() // OrganizationInput | Organization to create - 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) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.OrganizationsApi.CreateOrganization(context.Background()).OrganizationInput(organizationInput).Include(include).Exclude(exclude).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OrganizationsApi.CreateOrganization``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `CreateOrganization`: Organization - fmt.Fprintf(os.Stdout, "Response from `OrganizationsApi.CreateOrganization`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiCreateOrganizationRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **organizationInput** | [**OrganizationInput**](OrganizationInput.md) | Organization to create | - **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. | - -### Return type - -[**Organization**](Organization.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - ## CreateOrganizationInvitation > Invitation CreateOrganizationInvitation(ctx, id).InvitationInput(invitationInput).Include(include).Execute() @@ -910,7 +842,6 @@ Name | Type | Description | Notes Retrieve all organizations -FindOrganizations is a paginated API operation. You can specify page number and per page parameters with `Execute`, or to fetch and return all pages of results as a single slice you can call `ExecuteWithPagination()`. `ExecuteWithPagination()`, while convenient, can significantly increase the overhead of API calls in terms of time, network utilization, and memory. Excludes can make the call more efficient by removing any unneeded nested fields that are included by default. If any of the requests fail, the list of results will be nil and the error returned will represent the failed request. ### Example @@ -1054,6 +985,147 @@ Name | Type | Description | Notes [[Back to README]](../README.md) +## GetOrganizationMembers + +> MemberList GetOrganizationMembers(ctx, organizationId).Include(include).Execute() + +Retrieve organization members + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/equinix/equinix-sdk-go/services/metalv1" +) + +func main() { + organizationId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Organization UUID + 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) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OrganizationsApi.GetOrganizationMembers(context.Background(), organizationId).Include(include).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OrganizationsApi.GetOrganizationMembers``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetOrganizationMembers`: MemberList + fmt.Fprintf(os.Stdout, "Response from `OrganizationsApi.GetOrganizationMembers`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**organizationId** | **string** | Organization UUID | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetOrganizationMembersRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **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. | + +### Return type + +[**MemberList**](MemberList.md) + +### Authorization + +[x_auth_token](../README.md#x_auth_token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## RemoveOrganizationMember + +> RemoveOrganizationMember(ctx, organizationId, id).Execute() + +Remove member from the organization + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/equinix/equinix-sdk-go/services/metalv1" +) + +func main() { + organizationId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Organization UUID + id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Member UUID + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.OrganizationsApi.RemoveOrganizationMember(context.Background(), organizationId, id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OrganizationsApi.RemoveOrganizationMember``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**organizationId** | **string** | Organization UUID | +**id** | **string** | Member UUID | + +### Other Parameters + +Other parameters are passed through a pointer to a apiRemoveOrganizationMemberRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + + (empty response body) + +### Authorization + +[x_auth_token](../README.md#x_auth_token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + ## UpdateOrganization > Organization UpdateOrganization(ctx, id).OrganizationInput(organizationInput).Include(include).Exclude(exclude).Execute() @@ -1129,3 +1201,78 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +## UpdateOrganizationMemberRoles + +> Member UpdateOrganizationMemberRoles(ctx, organizationId, id).MemberUpdateInput(memberUpdateInput).Execute() + +Update roles for an organization member + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/equinix/equinix-sdk-go/services/metalv1" +) + +func main() { + organizationId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Organization UUID + id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Member UUID + memberUpdateInput := *openapiclient.NewMemberUpdateInput() // MemberUpdateInput | Organization to update (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OrganizationsApi.UpdateOrganizationMemberRoles(context.Background(), organizationId, id).MemberUpdateInput(memberUpdateInput).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OrganizationsApi.UpdateOrganizationMemberRoles``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateOrganizationMemberRoles`: Member + fmt.Fprintf(os.Stdout, "Response from `OrganizationsApi.UpdateOrganizationMemberRoles`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**organizationId** | **string** | Organization UUID | +**id** | **string** | Member UUID | + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdateOrganizationMemberRolesRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **memberUpdateInput** | [**MemberUpdateInput**](MemberUpdateInput.md) | Organization to update | + +### Return type + +[**Member**](Member.md) + +### Authorization + +[x_auth_token](../README.md#x_auth_token) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/services/metalv1/docs/ProjectCreateFromRootInputType.md b/services/metalv1/docs/ProjectCreateFromRootInputType.md index ec741853..6231abaf 100644 --- a/services/metalv1/docs/ProjectCreateFromRootInputType.md +++ b/services/metalv1/docs/ProjectCreateFromRootInputType.md @@ -5,8 +5,6 @@ * `DEFAULT` (value: `"default"`) -* `VMCE` (value: `"vmce"`) - [[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/docs/ProjectType.md b/services/metalv1/docs/ProjectType.md index 233e36ca..e12f5324 100644 --- a/services/metalv1/docs/ProjectType.md +++ b/services/metalv1/docs/ProjectType.md @@ -5,8 +5,6 @@ * `DEFAULT` (value: `"default"`) -* `VMCE` (value: `"vmce"`) - [[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/docs/Role.md b/services/metalv1/docs/Role.md new file mode 100644 index 00000000..7f73106d --- /dev/null +++ b/services/metalv1/docs/Role.md @@ -0,0 +1,108 @@ +# Role + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | Pointer to **string** | | [optional] +**Name** | Pointer to **string** | | [optional] +**Actions** | Pointer to **[]string** | | [optional] + +## Methods + +### NewRole + +`func NewRole() *Role` + +NewRole instantiates a new Role object +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 + +### NewRoleWithDefaults + +`func NewRoleWithDefaults() *Role` + +NewRoleWithDefaults instantiates a new Role object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *Role) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *Role) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *Role) SetId(v string)` + +SetId sets Id field to given value. + +### HasId + +`func (o *Role) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetName + +`func (o *Role) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *Role) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *Role) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *Role) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetActions + +`func (o *Role) GetActions() []string` + +GetActions returns the Actions field if non-nil, zero value otherwise. + +### GetActionsOk + +`func (o *Role) GetActionsOk() (*[]string, bool)` + +GetActionsOk returns a tuple with the Actions field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActions + +`func (o *Role) SetActions(v []string)` + +SetActions sets Actions field to given value. + +### HasActions + +`func (o *Role) HasActions() bool` + +HasActions 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/services/metalv1/docs/RoleList.md b/services/metalv1/docs/RoleList.md new file mode 100644 index 00000000..311d5f15 --- /dev/null +++ b/services/metalv1/docs/RoleList.md @@ -0,0 +1,56 @@ +# RoleList + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Roles** | Pointer to **map[string]interface{}** | | [optional] + +## Methods + +### NewRoleList + +`func NewRoleList() *RoleList` + +NewRoleList instantiates a new RoleList object +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 + +### NewRoleListWithDefaults + +`func NewRoleListWithDefaults() *RoleList` + +NewRoleListWithDefaults instantiates a new RoleList object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetRoles + +`func (o *RoleList) GetRoles() map[string]interface{}` + +GetRoles returns the Roles field if non-nil, zero value otherwise. + +### GetRolesOk + +`func (o *RoleList) GetRolesOk() (*map[string]interface{}, bool)` + +GetRolesOk returns a tuple with the Roles field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRoles + +`func (o *RoleList) SetRoles(v map[string]interface{})` + +SetRoles sets Roles field to given value. + +### HasRoles + +`func (o *RoleList) HasRoles() bool` + +HasRoles 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/services/metalv1/docs/RolesApi.md b/services/metalv1/docs/RolesApi.md new file mode 100644 index 00000000..9deb57cd --- /dev/null +++ b/services/metalv1/docs/RolesApi.md @@ -0,0 +1,153 @@ +# \RolesApi + +All URIs are relative to *https://api.equinix.com/metal/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetOrganizationRole**](RolesApi.md#GetOrganizationRole) | **Get** /organizations/{id}/roles/{role_id} | Get details about a specific role +[**ListOrganizationRoles**](RolesApi.md#ListOrganizationRoles) | **Get** /organizations/{id}/roles | List available roles + + + +## GetOrganizationRole + +> Role GetOrganizationRole(ctx, id, roleId).Execute() + +Get details about a specific role + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/equinix/equinix-sdk-go/services/metalv1" +) + +func main() { + id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Organization UUID + roleId := "roleId_example" // string | Role ID + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.RolesApi.GetOrganizationRole(context.Background(), id, roleId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `RolesApi.GetOrganizationRole``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetOrganizationRole`: Role + fmt.Fprintf(os.Stdout, "Response from `RolesApi.GetOrganizationRole`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string** | Organization UUID | +**roleId** | **string** | Role ID | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetOrganizationRoleRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + +[**Role**](Role.md) + +### Authorization + +[x_auth_token](../README.md#x_auth_token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListOrganizationRoles + +> RoleList ListOrganizationRoles(ctx, id).Execute() + +List available roles + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/equinix/equinix-sdk-go/services/metalv1" +) + +func main() { + id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Organization UUID + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.RolesApi.ListOrganizationRoles(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `RolesApi.ListOrganizationRoles``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListOrganizationRoles`: RoleList + fmt.Fprintf(os.Stdout, "Response from `RolesApi.ListOrganizationRoles`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string** | Organization UUID | + +### Other Parameters + +Other parameters are passed through a pointer to a apiListOrganizationRolesRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**RoleList**](RoleList.md) + +### Authorization + +[x_auth_token](../README.md#x_auth_token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/services/metalv1/docs/ServerInfo.md b/services/metalv1/docs/ServerInfo.md index 6b707d58..66530860 100644 --- a/services/metalv1/docs/ServerInfo.md +++ b/services/metalv1/docs/ServerInfo.md @@ -4,7 +4,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Facility** | Pointer to **string** | | [optional] **Metro** | Pointer to **string** | The metro ID or code to check the capacity in. | [optional] **Plan** | Pointer to **string** | The plan ID or slug to check the capacity of. | [optional] **Quantity** | Pointer to **string** | The number of servers to check the capacity of. | [optional] @@ -28,31 +27,6 @@ NewServerInfoWithDefaults instantiates a new ServerInfo object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set -### GetFacility - -`func (o *ServerInfo) GetFacility() string` - -GetFacility returns the Facility field if non-nil, zero value otherwise. - -### GetFacilityOk - -`func (o *ServerInfo) GetFacilityOk() (*string, bool)` - -GetFacilityOk returns a tuple with the Facility field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetFacility - -`func (o *ServerInfo) SetFacility(v string)` - -SetFacility sets Facility field to given value. - -### HasFacility - -`func (o *ServerInfo) HasFacility() bool` - -HasFacility returns a boolean if a field has been set. - ### GetMetro `func (o *ServerInfo) GetMetro() string` diff --git a/services/metalv1/docs/SpotMarketRequestCreateInput.md b/services/metalv1/docs/SpotMarketRequestCreateInput.md index b164e6ed..70efd0f3 100644 --- a/services/metalv1/docs/SpotMarketRequestCreateInput.md +++ b/services/metalv1/docs/SpotMarketRequestCreateInput.md @@ -7,7 +7,6 @@ Name | Type | Description | Notes **DevicesMax** | Pointer to **int32** | | [optional] **DevicesMin** | Pointer to **int32** | | [optional] **EndAt** | Pointer to **time.Time** | | [optional] -**Facilities** | Pointer to **[]string** | | [optional] **InstanceParameters** | Pointer to [**SpotMarketRequestCreateInputInstanceParameters**](SpotMarketRequestCreateInputInstanceParameters.md) | | [optional] **MaxBidPrice** | Pointer to **float32** | | [optional] **Metro** | Pointer to **string** | The metro ID or code the spot market request will be created in. | [optional] @@ -106,31 +105,6 @@ SetEndAt sets EndAt field to given value. HasEndAt returns a boolean if a field has been set. -### GetFacilities - -`func (o *SpotMarketRequestCreateInput) GetFacilities() []string` - -GetFacilities returns the Facilities field if non-nil, zero value otherwise. - -### GetFacilitiesOk - -`func (o *SpotMarketRequestCreateInput) GetFacilitiesOk() (*[]string, bool)` - -GetFacilitiesOk returns a tuple with the Facilities field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetFacilities - -`func (o *SpotMarketRequestCreateInput) SetFacilities(v []string)` - -SetFacilities sets Facilities field to given value. - -### HasFacilities - -`func (o *SpotMarketRequestCreateInput) HasFacilities() bool` - -HasFacilities returns a boolean if a field has been set. - ### GetInstanceParameters `func (o *SpotMarketRequestCreateInput) GetInstanceParameters() SpotMarketRequestCreateInputInstanceParameters` diff --git a/services/metalv1/docs/VLANsApi.md b/services/metalv1/docs/VLANsApi.md index 21c7dad8..42bd4204 100644 --- a/services/metalv1/docs/VLANsApi.md +++ b/services/metalv1/docs/VLANsApi.md @@ -162,7 +162,7 @@ Name | Type | Description | Notes ## FindVirtualNetworks -> VirtualNetworkList FindVirtualNetworks(ctx, id).Include(include).Exclude(exclude).Facility(facility).Metro(metro).Execute() +> VirtualNetworkList FindVirtualNetworks(ctx, id).Include(include).Exclude(exclude).Metro(metro).Execute() Retrieve all virtual networks @@ -184,12 +184,11 @@ func main() { id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Project UUID 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) - facility := "facility_example" // string | Filter by Facility ID (uuid) or Facility Code (optional) metro := "metro_example" // string | Filter by Metro ID (uuid) or Metro Code (optional) configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.VLANsApi.FindVirtualNetworks(context.Background(), id).Include(include).Exclude(exclude).Facility(facility).Metro(metro).Execute() + resp, r, err := apiClient.VLANsApi.FindVirtualNetworks(context.Background(), id).Include(include).Exclude(exclude).Metro(metro).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `VLANsApi.FindVirtualNetworks``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -217,7 +216,6 @@ Name | Type | Description | Notes **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. | - **facility** | **string** | Filter by Facility ID (uuid) or Facility Code | **metro** | **string** | Filter by Metro ID (uuid) or Metro Code | ### Return type diff --git a/services/metalv1/docs/VirtualNetworkCreateInput.md b/services/metalv1/docs/VirtualNetworkCreateInput.md index 7cadcce5..59df15d9 100644 --- a/services/metalv1/docs/VirtualNetworkCreateInput.md +++ b/services/metalv1/docs/VirtualNetworkCreateInput.md @@ -5,7 +5,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Description** | Pointer to **string** | | [optional] -**Facility** | Pointer to **string** | The UUID (or facility code) for the Facility in which to create this Virtual network. | [optional] **Metro** | Pointer to **string** | The UUID (or metro code) for the Metro in which to create this Virtual Network. | [optional] **Vxlan** | Pointer to **int32** | VLAN ID between 2-3999. Must be unique for the project within the Metro in which this Virtual Network is being created. If no value is specified, the next-available VLAN ID in the range 1000-1999 will be automatically selected. | [optional] **Tags** | Pointer to **[]string** | | [optional] @@ -54,31 +53,6 @@ SetDescription sets Description field to given value. HasDescription returns a boolean if a field has been set. -### GetFacility - -`func (o *VirtualNetworkCreateInput) GetFacility() string` - -GetFacility returns the Facility field if non-nil, zero value otherwise. - -### GetFacilityOk - -`func (o *VirtualNetworkCreateInput) GetFacilityOk() (*string, bool)` - -GetFacilityOk returns a tuple with the Facility field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetFacility - -`func (o *VirtualNetworkCreateInput) SetFacility(v string)` - -SetFacility sets Facility field to given value. - -### HasFacility - -`func (o *VirtualNetworkCreateInput) HasFacility() bool` - -HasFacility returns a boolean if a field has been set. - ### GetMetro `func (o *VirtualNetworkCreateInput) GetMetro() string` diff --git a/services/metalv1/docs/VlanFabricVcCreateInput.md b/services/metalv1/docs/VlanFabricVcCreateInput.md index b347a806..7ded5274 100644 --- a/services/metalv1/docs/VlanFabricVcCreateInput.md +++ b/services/metalv1/docs/VlanFabricVcCreateInput.md @@ -6,7 +6,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **ContactEmail** | Pointer to **string** | The preferred email used for communication and notifications about the Equinix Fabric interconnection. Optional and defaults to the primary user email address when using a User API key or the organization owner email address when using a Project API key. | [optional] **Description** | Pointer to **string** | | [optional] -**FacilityId** | Pointer to **string** | | [optional] **Metro** | **string** | A Metro ID or code. When creating Fabric VCs (Metal Billed), this is where interconnection will be originating from, as we pre-authorize the use of one of our shared ports as the origin of the interconnection using A-Side service tokens. We only allow local connections for Fabric VCs (Metal Billed), so the destination location must be the same as the origin. For Fabric VCs (Fabric Billed), or shared connections, this will be the destination of the interconnection. We allow remote connections for Fabric VCs (Fabric Billed), so the origin of the interconnection can be a different metro set here. | **Name** | **string** | | **Project** | Pointer to **string** | | [optional] @@ -86,31 +85,6 @@ SetDescription sets Description field to given value. HasDescription returns a boolean if a field has been set. -### GetFacilityId - -`func (o *VlanFabricVcCreateInput) GetFacilityId() string` - -GetFacilityId returns the FacilityId field if non-nil, zero value otherwise. - -### GetFacilityIdOk - -`func (o *VlanFabricVcCreateInput) GetFacilityIdOk() (*string, bool)` - -GetFacilityIdOk returns a tuple with the FacilityId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetFacilityId - -`func (o *VlanFabricVcCreateInput) SetFacilityId(v string)` - -SetFacilityId sets FacilityId field to given value. - -### HasFacilityId - -`func (o *VlanFabricVcCreateInput) HasFacilityId() bool` - -HasFacilityId returns a boolean if a field has been set. - ### GetMetro `func (o *VlanFabricVcCreateInput) GetMetro() string` diff --git a/services/metalv1/docs/VrfFabricVcCreateInput.md b/services/metalv1/docs/VrfFabricVcCreateInput.md index 4e043789..eb24cb3d 100644 --- a/services/metalv1/docs/VrfFabricVcCreateInput.md +++ b/services/metalv1/docs/VrfFabricVcCreateInput.md @@ -6,7 +6,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **ContactEmail** | Pointer to **string** | The preferred email used for communication and notifications about the Equinix Fabric interconnection. Optional and defaults to the primary user email address when using a User API key or the organization owner email address when using a Project API key. | [optional] **Description** | Pointer to **string** | | [optional] -**FacilityId** | Pointer to **string** | | [optional] **Metro** | **string** | A Metro ID or code. When creating Fabric VCs (Metal Billed), this is where interconnection will be originating from, as we pre-authorize the use of one of our shared ports as the origin of the interconnection using A-Side service tokens. We only allow local connections for Fabric VCs (Metal Billed), so the destination location must be the same as the origin. For Fabric VCs (Fabric Billed), or shared connections, this will be the destination of the interconnection. We allow remote connections for Fabric VCs (Fabric Billed), so the origin of the interconnection can be a different metro set here. | **Name** | **string** | | **Project** | Pointer to **string** | | [optional] @@ -86,31 +85,6 @@ SetDescription sets Description field to given value. HasDescription returns a boolean if a field has been set. -### GetFacilityId - -`func (o *VrfFabricVcCreateInput) GetFacilityId() string` - -GetFacilityId returns the FacilityId field if non-nil, zero value otherwise. - -### GetFacilityIdOk - -`func (o *VrfFabricVcCreateInput) GetFacilityIdOk() (*string, bool)` - -GetFacilityIdOk returns a tuple with the FacilityId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetFacilityId - -`func (o *VrfFabricVcCreateInput) SetFacilityId(v string)` - -SetFacilityId sets FacilityId field to given value. - -### HasFacilityId - -`func (o *VrfFabricVcCreateInput) HasFacilityId() bool` - -HasFacilityId returns a boolean if a field has been set. - ### GetMetro `func (o *VrfFabricVcCreateInput) GetMetro() string` diff --git a/services/metalv1/go.mod b/services/metalv1/go.mod new file mode 100644 index 00000000..125137da --- /dev/null +++ b/services/metalv1/go.mod @@ -0,0 +1,6 @@ +module github.com/equinix/equinix-sdk-go/services/metalv1 + +go 1.18 + +require ( +) diff --git a/services/metalv1/go.sum b/services/metalv1/go.sum new file mode 100644 index 00000000..c966c8dd --- /dev/null +++ b/services/metalv1/go.sum @@ -0,0 +1,11 @@ +cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e h1:bRhVy7zSSasaqNksaRZiA5EEI+Ei4I1nO5Jh72wfHlg= +golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4 h1:YUO/7uOKsKeq9UokNS62b8FYywz3ker1l1vDZRCRefw= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +google.golang.org/appengine v1.4.0 h1:/wp5JvzpHIxhs/dumFmF7BXTf3Z+dd4uXta4kVyO508= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= diff --git a/services/metalv1/model_create_device_request.go b/services/metalv1/model_create_device_request.go deleted file mode 100644 index 338b85dd..00000000 --- a/services/metalv1/model_create_device_request.go +++ /dev/null @@ -1,143 +0,0 @@ -/* -Metal API - -Contact: support@equinixmetal.com -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package metalv1 - -import ( - "encoding/json" - "fmt" -) - -// CreateDeviceRequest - struct for CreateDeviceRequest -type CreateDeviceRequest struct { - DeviceCreateInFacilityInput *DeviceCreateInFacilityInput - DeviceCreateInMetroInput *DeviceCreateInMetroInput -} - -// DeviceCreateInFacilityInputAsCreateDeviceRequest is a convenience function that returns DeviceCreateInFacilityInput wrapped in CreateDeviceRequest -func DeviceCreateInFacilityInputAsCreateDeviceRequest(v *DeviceCreateInFacilityInput) CreateDeviceRequest { - return CreateDeviceRequest{ - DeviceCreateInFacilityInput: v, - } -} - -// DeviceCreateInMetroInputAsCreateDeviceRequest is a convenience function that returns DeviceCreateInMetroInput wrapped in CreateDeviceRequest -func DeviceCreateInMetroInputAsCreateDeviceRequest(v *DeviceCreateInMetroInput) CreateDeviceRequest { - return CreateDeviceRequest{ - DeviceCreateInMetroInput: v, - } -} - -// Unmarshal JSON data into one of the pointers in the struct -func (dst *CreateDeviceRequest) UnmarshalJSON(data []byte) error { - var err error - match := 0 - // try to unmarshal data into DeviceCreateInFacilityInput - err = newStrictDecoder(data).Decode(&dst.DeviceCreateInFacilityInput) - if err == nil { - jsonDeviceCreateInFacilityInput, _ := json.Marshal(dst.DeviceCreateInFacilityInput) - if string(jsonDeviceCreateInFacilityInput) == "{}" { // empty struct - dst.DeviceCreateInFacilityInput = nil - } else { - match++ - } - } else { - dst.DeviceCreateInFacilityInput = nil - } - - // try to unmarshal data into DeviceCreateInMetroInput - err = newStrictDecoder(data).Decode(&dst.DeviceCreateInMetroInput) - if err == nil { - jsonDeviceCreateInMetroInput, _ := json.Marshal(dst.DeviceCreateInMetroInput) - if string(jsonDeviceCreateInMetroInput) == "{}" { // empty struct - dst.DeviceCreateInMetroInput = nil - } else { - match++ - } - } else { - dst.DeviceCreateInMetroInput = nil - } - - if match > 1 { // more than 1 match - // reset to nil - dst.DeviceCreateInFacilityInput = nil - dst.DeviceCreateInMetroInput = nil - - return fmt.Errorf("data matches more than one schema in oneOf(CreateDeviceRequest)") - } else if match == 1 { - return nil // exactly one match - } else { // no match - return fmt.Errorf("data failed to match schemas in oneOf(CreateDeviceRequest)") - } -} - -// Marshal data from the first non-nil pointers in the struct to JSON -func (src CreateDeviceRequest) MarshalJSON() ([]byte, error) { - if src.DeviceCreateInFacilityInput != nil { - return json.Marshal(&src.DeviceCreateInFacilityInput) - } - - if src.DeviceCreateInMetroInput != nil { - return json.Marshal(&src.DeviceCreateInMetroInput) - } - - return nil, nil // no data in oneOf schemas -} - -// Get the actual instance -func (obj *CreateDeviceRequest) GetActualInstance() interface{} { - if obj == nil { - return nil - } - if obj.DeviceCreateInFacilityInput != nil { - return obj.DeviceCreateInFacilityInput - } - - if obj.DeviceCreateInMetroInput != nil { - return obj.DeviceCreateInMetroInput - } - - // all schemas are nil - return nil -} - -type NullableCreateDeviceRequest struct { - value *CreateDeviceRequest - isSet bool -} - -func (v NullableCreateDeviceRequest) Get() *CreateDeviceRequest { - return v.value -} - -func (v *NullableCreateDeviceRequest) Set(val *CreateDeviceRequest) { - v.value = val - v.isSet = true -} - -func (v NullableCreateDeviceRequest) IsSet() bool { - return v.isSet -} - -func (v *NullableCreateDeviceRequest) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCreateDeviceRequest(val *CreateDeviceRequest) *NullableCreateDeviceRequest { - return &NullableCreateDeviceRequest{value: val, isSet: true} -} - -func (v NullableCreateDeviceRequest) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCreateDeviceRequest) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/metalv1/model_dedicated_port_create_input.go b/services/metalv1/model_dedicated_port_create_input.go index 06ebfb01..3f2b2e24 100644 --- a/services/metalv1/model_dedicated_port_create_input.go +++ b/services/metalv1/model_dedicated_port_create_input.go @@ -23,7 +23,6 @@ type DedicatedPortCreateInput struct { // The preferred email used for communication and notifications about the Equinix Fabric interconnection. Optional and defaults to the primary user email address when using a User API key or the organization owner email address when using a Project API key. ContactEmail *string `json:"contact_email,omitempty"` Description *string `json:"description,omitempty"` - FacilityId *string `json:"facility_id,omitempty"` // A Metro ID or code. For interconnections with Dedicated Ports, this will be the location of the issued Dedicated Ports. Metro string `json:"metro"` Mode *DedicatedPortCreateInputMode `json:"mode,omitempty"` @@ -159,38 +158,6 @@ func (o *DedicatedPortCreateInput) SetDescription(v string) { o.Description = &v } -// GetFacilityId returns the FacilityId field value if set, zero value otherwise. -func (o *DedicatedPortCreateInput) GetFacilityId() string { - if o == nil || IsNil(o.FacilityId) { - var ret string - return ret - } - return *o.FacilityId -} - -// GetFacilityIdOk returns a tuple with the FacilityId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *DedicatedPortCreateInput) GetFacilityIdOk() (*string, bool) { - if o == nil || IsNil(o.FacilityId) { - return nil, false - } - return o.FacilityId, true -} - -// HasFacilityId returns a boolean if a field has been set. -func (o *DedicatedPortCreateInput) HasFacilityId() bool { - if o != nil && !IsNil(o.FacilityId) { - return true - } - - return false -} - -// SetFacilityId gets a reference to the given string and assigns it to the FacilityId field. -func (o *DedicatedPortCreateInput) SetFacilityId(v string) { - o.FacilityId = &v -} - // GetMetro returns the Metro field value func (o *DedicatedPortCreateInput) GetMetro() string { if o == nil { @@ -466,9 +433,6 @@ func (o DedicatedPortCreateInput) ToMap() (map[string]interface{}, error) { if !IsNil(o.Description) { toSerialize["description"] = o.Description } - if !IsNil(o.FacilityId) { - toSerialize["facility_id"] = o.FacilityId - } toSerialize["metro"] = o.Metro if !IsNil(o.Mode) { toSerialize["mode"] = o.Mode @@ -537,7 +501,6 @@ func (o *DedicatedPortCreateInput) UnmarshalJSON(data []byte) (err error) { delete(additionalProperties, "billing_account_name") delete(additionalProperties, "contact_email") delete(additionalProperties, "description") - delete(additionalProperties, "facility_id") delete(additionalProperties, "metro") delete(additionalProperties, "mode") delete(additionalProperties, "name") diff --git a/services/metalv1/model_device_create_in_metro_input.go b/services/metalv1/model_device_create_in_metro_input.go index 12c2a797..7224c996 100644 --- a/services/metalv1/model_device_create_in_metro_input.go +++ b/services/metalv1/model_device_create_in_metro_input.go @@ -19,8 +19,7 @@ var _ MappedNullable = &DeviceCreateInMetroInput{} // DeviceCreateInMetroInput struct for DeviceCreateInMetroInput type DeviceCreateInMetroInput struct { - // Metro code or ID of where the device should be provisioned in, or it can be instructed to create the device in the best available metro with `{ \"metro\": \"any\" }`. The special metro value of any means anywhere, any metro. When any is chosen in the request, the metro location is picked per our scheduling algorithms that favor the following factors: hardware reservation location (if requesting reserved hardware), ip reservations, spot instances, etc. The any keyword *does not* optimize for cost, this means that usage costs (instance, transfer, other features dependent on location) will vary. Please check metro value in response to see where the device was created. Either metro or facility must be provided. - Metro string `json:"metro"` + Metro MetroInputMetro `json:"metro"` // When true, devices with a `custom_ipxe` OS will always boot to iPXE. The default setting of false ensures that iPXE will be used on only the first boot. AlwaysPxe *bool `json:"always_pxe,omitempty"` BillingCycle *DeviceCreateInputBillingCycle `json:"billing_cycle,omitempty"` @@ -77,7 +76,7 @@ type _DeviceCreateInMetroInput DeviceCreateInMetroInput // 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 NewDeviceCreateInMetroInput(metro string, operatingSystem string, plan string) *DeviceCreateInMetroInput { +func NewDeviceCreateInMetroInput(metro MetroInputMetro, operatingSystem string, plan string) *DeviceCreateInMetroInput { this := DeviceCreateInMetroInput{} this.Metro = metro var alwaysPxe bool = false @@ -110,9 +109,9 @@ func NewDeviceCreateInMetroInputWithDefaults() *DeviceCreateInMetroInput { } // GetMetro returns the Metro field value -func (o *DeviceCreateInMetroInput) GetMetro() string { +func (o *DeviceCreateInMetroInput) GetMetro() MetroInputMetro { if o == nil { - var ret string + var ret MetroInputMetro return ret } @@ -121,7 +120,7 @@ func (o *DeviceCreateInMetroInput) GetMetro() string { // GetMetroOk returns a tuple with the Metro field value // and a boolean to check if the value has been set. -func (o *DeviceCreateInMetroInput) GetMetroOk() (*string, bool) { +func (o *DeviceCreateInMetroInput) GetMetroOk() (*MetroInputMetro, bool) { if o == nil { return nil, false } @@ -129,7 +128,7 @@ func (o *DeviceCreateInMetroInput) GetMetroOk() (*string, bool) { } // SetMetro sets field value -func (o *DeviceCreateInMetroInput) SetMetro(v string) { +func (o *DeviceCreateInMetroInput) SetMetro(v MetroInputMetro) { o.Metro = v } diff --git a/services/metalv1/model_find_facilities_include_parameter_inner.go b/services/metalv1/model_find_facilities_include_parameter_inner.go deleted file mode 100644 index 3c632407..00000000 --- a/services/metalv1/model_find_facilities_include_parameter_inner.go +++ /dev/null @@ -1,108 +0,0 @@ -/* -Metal API - -Contact: support@equinixmetal.com -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package metalv1 - -import ( - "encoding/json" - "fmt" -) - -// FindFacilitiesIncludeParameterInner the model 'FindFacilitiesIncludeParameterInner' -type FindFacilitiesIncludeParameterInner string - -// List of findFacilities_include_parameter_inner -const ( - FINDFACILITIESINCLUDEPARAMETERINNER_ADDRESS FindFacilitiesIncludeParameterInner = "address" - FINDFACILITIESINCLUDEPARAMETERINNER_LABELS FindFacilitiesIncludeParameterInner = "labels" -) - -// All allowed values of FindFacilitiesIncludeParameterInner enum -var AllowedFindFacilitiesIncludeParameterInnerEnumValues = []FindFacilitiesIncludeParameterInner{ - "address", - "labels", -} - -func (v *FindFacilitiesIncludeParameterInner) UnmarshalJSON(src []byte) error { - var value string - err := json.Unmarshal(src, &value) - if err != nil { - return err - } - enumTypeValue := FindFacilitiesIncludeParameterInner(value) - for _, existing := range AllowedFindFacilitiesIncludeParameterInnerEnumValues { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - return fmt.Errorf("%+v is not a valid FindFacilitiesIncludeParameterInner", value) -} - -// NewFindFacilitiesIncludeParameterInnerFromValue returns a pointer to a valid FindFacilitiesIncludeParameterInner -// for the value passed as argument, or an error if the value passed is not allowed by the enum -func NewFindFacilitiesIncludeParameterInnerFromValue(v string) (*FindFacilitiesIncludeParameterInner, error) { - ev := FindFacilitiesIncludeParameterInner(v) - if ev.IsValid() { - return &ev, nil - } else { - return nil, fmt.Errorf("invalid value '%v' for FindFacilitiesIncludeParameterInner: valid values are %v", v, AllowedFindFacilitiesIncludeParameterInnerEnumValues) - } -} - -// IsValid return true if the value is valid for the enum, false otherwise -func (v FindFacilitiesIncludeParameterInner) IsValid() bool { - for _, existing := range AllowedFindFacilitiesIncludeParameterInnerEnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to findFacilities_include_parameter_inner value -func (v FindFacilitiesIncludeParameterInner) Ptr() *FindFacilitiesIncludeParameterInner { - return &v -} - -type NullableFindFacilitiesIncludeParameterInner struct { - value *FindFacilitiesIncludeParameterInner - isSet bool -} - -func (v NullableFindFacilitiesIncludeParameterInner) Get() *FindFacilitiesIncludeParameterInner { - return v.value -} - -func (v *NullableFindFacilitiesIncludeParameterInner) Set(val *FindFacilitiesIncludeParameterInner) { - v.value = val - v.isSet = true -} - -func (v NullableFindFacilitiesIncludeParameterInner) IsSet() bool { - return v.isSet -} - -func (v *NullableFindFacilitiesIncludeParameterInner) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableFindFacilitiesIncludeParameterInner(val *FindFacilitiesIncludeParameterInner) *NullableFindFacilitiesIncludeParameterInner { - return &NullableFindFacilitiesIncludeParameterInner{value: val, isSet: true} -} - -func (v NullableFindFacilitiesIncludeParameterInner) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableFindFacilitiesIncludeParameterInner) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/metalv1/model_find_organization_devices_categories_parameter_inner.go b/services/metalv1/model_find_organization_devices_categories_parameter_inner.go index 154fe1b5..96db2830 100644 --- a/services/metalv1/model_find_organization_devices_categories_parameter_inner.go +++ b/services/metalv1/model_find_organization_devices_categories_parameter_inner.go @@ -20,7 +20,6 @@ type FindOrganizationDevicesCategoriesParameterInner string const ( FINDORGANIZATIONDEVICESCATEGORIESPARAMETERINNER_COMPUTE FindOrganizationDevicesCategoriesParameterInner = "compute" FINDORGANIZATIONDEVICESCATEGORIESPARAMETERINNER_STORAGE FindOrganizationDevicesCategoriesParameterInner = "storage" - FINDORGANIZATIONDEVICESCATEGORIESPARAMETERINNER_VMCE FindOrganizationDevicesCategoriesParameterInner = "vmce" FINDORGANIZATIONDEVICESCATEGORIESPARAMETERINNER_LEGACY_GEN FindOrganizationDevicesCategoriesParameterInner = "legacy_gen" FINDORGANIZATIONDEVICESCATEGORIESPARAMETERINNER_CURRENT_GEN FindOrganizationDevicesCategoriesParameterInner = "current_gen" ) @@ -29,7 +28,6 @@ const ( var AllowedFindOrganizationDevicesCategoriesParameterInnerEnumValues = []FindOrganizationDevicesCategoriesParameterInner{ "compute", "storage", - "vmce", "legacy_gen", "current_gen", } diff --git a/services/metalv1/model_instances_batch_create_input_batches_inner.go b/services/metalv1/model_instances_batch_create_input_batches_inner.go index c85927a4..e59930af 100644 --- a/services/metalv1/model_instances_batch_create_input_batches_inner.go +++ b/services/metalv1/model_instances_batch_create_input_batches_inner.go @@ -19,11 +19,7 @@ var _ MappedNullable = &InstancesBatchCreateInputBatchesInner{} // InstancesBatchCreateInputBatchesInner struct for InstancesBatchCreateInputBatchesInner type InstancesBatchCreateInputBatchesInner struct { - Hostnames []string `json:"hostnames,omitempty"` - // The number of devices to create in this batch. The hostname may contain an `{{index}}` placeholder, which will be replaced with the index of the device in the batch. For example, if the hostname is `device-{{index}}`, the first device in the batch will have the hostname `device-01`, the second device will have the hostname `device-02`, and so on. - Quantity *int32 `json:"quantity,omitempty"` - // Metro code or ID of where the device should be provisioned in, or it can be instructed to create the device in the best available metro with `{ \"metro\": \"any\" }`. The special metro value of any means anywhere, any metro. When any is chosen in the request, the metro location is picked per our scheduling algorithms that favor the following factors: hardware reservation location (if requesting reserved hardware), ip reservations, spot instances, etc. The any keyword *does not* optimize for cost, this means that usage costs (instance, transfer, other features dependent on location) will vary. Please check metro value in response to see where the device was created. Either metro or facility must be provided. - Metro string `json:"metro"` + Metro MetroInputMetro `json:"metro"` // When true, devices with a `custom_ipxe` OS will always boot to iPXE. The default setting of false ensures that iPXE will be used on only the first boot. AlwaysPxe *bool `json:"always_pxe,omitempty"` BillingCycle *DeviceCreateInputBillingCycle `json:"billing_cycle,omitempty"` @@ -70,10 +66,10 @@ type InstancesBatchCreateInputBatchesInner struct { // A list of UUIDs identifying the users that should be authorized to access this device (typically via /root/.ssh/authorized_keys). These keys will also appear in the device metadata. The users must be members of the project or organization. If no SSH keys are specified (`user_ssh_keys`, `project_ssh_keys`, and `ssh_keys` are all empty lists or omitted), all parent project keys, parent project members keys and organization members keys will be included. This behaviour can be changed with 'no_ssh_keys' option to omit any SSH key being added. UserSshKeys []string `json:"user_ssh_keys,omitempty"` // The userdata presented in the metadata service for this device. Userdata is fetched and interpreted by the operating system installed on the device. Acceptable formats are determined by the operating system, with the exception of a special iPXE enabling syntax which is handled before the operating system starts. See [Server User Data](https://deploy.equinix.com/developers/docs/metal/server-metadata/user-data/) and [Provisioning with Custom iPXE](https://deploy.equinix.com/developers/docs/metal/operating-systems/custom-ipxe/#provisioning-with-custom-ipxe) for more details. - Userdata *string `json:"userdata,omitempty"` - // The datacenter where the device should be created. Either metro or facility must be provided. The API will accept either a single facility `{ \"facility\": \"f1\" }`, or it can be instructed to create the device in the best available datacenter `{ \"facility\": \"any\" }`. Additionally it is possible to set a prioritized location selection. For example `{ \"facility\": [\"f3\", \"f2\", \"any\"] }` can be used to prioritize `f3` and then `f2` before accepting `any` facility. If none of the facilities provided have availability for the requested device the request will fail. - // Deprecated - Facility []string `json:"facility"` + Userdata *string `json:"userdata,omitempty"` + Hostnames []string `json:"hostnames,omitempty"` + // The number of devices to create in this batch. The hostname may contain an `{{index}}` placeholder, which will be replaced with the index of the device in the batch. For example, if the hostname is `device-{{index}}`, the first device in the batch will have the hostname `device-01`, the second device will have the hostname `device-02`, and so on. + Quantity *int32 `json:"quantity,omitempty"` AdditionalProperties map[string]interface{} } @@ -83,7 +79,7 @@ type _InstancesBatchCreateInputBatchesInner InstancesBatchCreateInputBatchesInne // 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 NewInstancesBatchCreateInputBatchesInner(metro string, operatingSystem string, plan string, facility []string) *InstancesBatchCreateInputBatchesInner { +func NewInstancesBatchCreateInputBatchesInner(metro MetroInputMetro, operatingSystem string, plan string) *InstancesBatchCreateInputBatchesInner { this := InstancesBatchCreateInputBatchesInner{} this.Metro = metro var alwaysPxe bool = false @@ -96,7 +92,6 @@ func NewInstancesBatchCreateInputBatchesInner(metro string, operatingSystem stri this.NoSshKeys = &noSshKeys this.OperatingSystem = operatingSystem this.Plan = plan - this.Facility = facility return &this } @@ -116,74 +111,10 @@ func NewInstancesBatchCreateInputBatchesInnerWithDefaults() *InstancesBatchCreat return &this } -// GetHostnames returns the Hostnames field value if set, zero value otherwise. -func (o *InstancesBatchCreateInputBatchesInner) GetHostnames() []string { - if o == nil || IsNil(o.Hostnames) { - var ret []string - return ret - } - return o.Hostnames -} - -// GetHostnamesOk returns a tuple with the Hostnames field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *InstancesBatchCreateInputBatchesInner) GetHostnamesOk() ([]string, bool) { - if o == nil || IsNil(o.Hostnames) { - return nil, false - } - return o.Hostnames, true -} - -// HasHostnames returns a boolean if a field has been set. -func (o *InstancesBatchCreateInputBatchesInner) HasHostnames() bool { - if o != nil && !IsNil(o.Hostnames) { - return true - } - - return false -} - -// SetHostnames gets a reference to the given []string and assigns it to the Hostnames field. -func (o *InstancesBatchCreateInputBatchesInner) SetHostnames(v []string) { - o.Hostnames = v -} - -// GetQuantity returns the Quantity field value if set, zero value otherwise. -func (o *InstancesBatchCreateInputBatchesInner) GetQuantity() int32 { - if o == nil || IsNil(o.Quantity) { - var ret int32 - return ret - } - return *o.Quantity -} - -// GetQuantityOk returns a tuple with the Quantity field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *InstancesBatchCreateInputBatchesInner) GetQuantityOk() (*int32, bool) { - if o == nil || IsNil(o.Quantity) { - return nil, false - } - return o.Quantity, true -} - -// HasQuantity returns a boolean if a field has been set. -func (o *InstancesBatchCreateInputBatchesInner) HasQuantity() bool { - if o != nil && !IsNil(o.Quantity) { - return true - } - - return false -} - -// SetQuantity gets a reference to the given int32 and assigns it to the Quantity field. -func (o *InstancesBatchCreateInputBatchesInner) SetQuantity(v int32) { - o.Quantity = &v -} - // GetMetro returns the Metro field value -func (o *InstancesBatchCreateInputBatchesInner) GetMetro() string { +func (o *InstancesBatchCreateInputBatchesInner) GetMetro() MetroInputMetro { if o == nil { - var ret string + var ret MetroInputMetro return ret } @@ -192,7 +123,7 @@ func (o *InstancesBatchCreateInputBatchesInner) GetMetro() string { // GetMetroOk returns a tuple with the Metro field value // and a boolean to check if the value has been set. -func (o *InstancesBatchCreateInputBatchesInner) GetMetroOk() (*string, bool) { +func (o *InstancesBatchCreateInputBatchesInner) GetMetroOk() (*MetroInputMetro, bool) { if o == nil { return nil, false } @@ -200,7 +131,7 @@ func (o *InstancesBatchCreateInputBatchesInner) GetMetroOk() (*string, bool) { } // SetMetro sets field value -func (o *InstancesBatchCreateInputBatchesInner) SetMetro(v string) { +func (o *InstancesBatchCreateInputBatchesInner) SetMetro(v MetroInputMetro) { o.Metro = v } @@ -988,31 +919,68 @@ func (o *InstancesBatchCreateInputBatchesInner) SetUserdata(v string) { o.Userdata = &v } -// GetFacility returns the Facility field value -// Deprecated -func (o *InstancesBatchCreateInputBatchesInner) GetFacility() []string { - if o == nil { +// GetHostnames returns the Hostnames field value if set, zero value otherwise. +func (o *InstancesBatchCreateInputBatchesInner) GetHostnames() []string { + if o == nil || IsNil(o.Hostnames) { var ret []string return ret } + return o.Hostnames +} - return o.Facility +// GetHostnamesOk returns a tuple with the Hostnames field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *InstancesBatchCreateInputBatchesInner) GetHostnamesOk() ([]string, bool) { + if o == nil || IsNil(o.Hostnames) { + return nil, false + } + return o.Hostnames, true } -// GetFacilityOk returns a tuple with the Facility field value +// HasHostnames returns a boolean if a field has been set. +func (o *InstancesBatchCreateInputBatchesInner) HasHostnames() bool { + if o != nil && !IsNil(o.Hostnames) { + return true + } + + return false +} + +// SetHostnames gets a reference to the given []string and assigns it to the Hostnames field. +func (o *InstancesBatchCreateInputBatchesInner) SetHostnames(v []string) { + o.Hostnames = v +} + +// GetQuantity returns the Quantity field value if set, zero value otherwise. +func (o *InstancesBatchCreateInputBatchesInner) GetQuantity() int32 { + if o == nil || IsNil(o.Quantity) { + var ret int32 + return ret + } + return *o.Quantity +} + +// GetQuantityOk returns a tuple with the Quantity field value if set, nil otherwise // and a boolean to check if the value has been set. -// Deprecated -func (o *InstancesBatchCreateInputBatchesInner) GetFacilityOk() ([]string, bool) { - if o == nil { +func (o *InstancesBatchCreateInputBatchesInner) GetQuantityOk() (*int32, bool) { + if o == nil || IsNil(o.Quantity) { return nil, false } - return o.Facility, true + return o.Quantity, true } -// SetFacility sets field value -// Deprecated -func (o *InstancesBatchCreateInputBatchesInner) SetFacility(v []string) { - o.Facility = v +// HasQuantity returns a boolean if a field has been set. +func (o *InstancesBatchCreateInputBatchesInner) HasQuantity() bool { + if o != nil && !IsNil(o.Quantity) { + return true + } + + return false +} + +// SetQuantity gets a reference to the given int32 and assigns it to the Quantity field. +func (o *InstancesBatchCreateInputBatchesInner) SetQuantity(v int32) { + o.Quantity = &v } func (o InstancesBatchCreateInputBatchesInner) MarshalJSON() ([]byte, error) { @@ -1025,12 +993,6 @@ func (o InstancesBatchCreateInputBatchesInner) MarshalJSON() ([]byte, error) { func (o InstancesBatchCreateInputBatchesInner) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.Hostnames) { - toSerialize["hostnames"] = o.Hostnames - } - if !IsNil(o.Quantity) { - toSerialize["quantity"] = o.Quantity - } toSerialize["metro"] = o.Metro if !IsNil(o.AlwaysPxe) { toSerialize["always_pxe"] = o.AlwaysPxe @@ -1103,7 +1065,12 @@ func (o InstancesBatchCreateInputBatchesInner) ToMap() (map[string]interface{}, if !IsNil(o.Userdata) { toSerialize["userdata"] = o.Userdata } - toSerialize["facility"] = o.Facility + if !IsNil(o.Hostnames) { + toSerialize["hostnames"] = o.Hostnames + } + if !IsNil(o.Quantity) { + toSerialize["quantity"] = o.Quantity + } for key, value := range o.AdditionalProperties { toSerialize[key] = value @@ -1120,7 +1087,6 @@ func (o *InstancesBatchCreateInputBatchesInner) UnmarshalJSON(data []byte) (err "metro", "operating_system", "plan", - "facility", } allProperties := make(map[string]interface{}) @@ -1150,8 +1116,6 @@ func (o *InstancesBatchCreateInputBatchesInner) UnmarshalJSON(data []byte) (err additionalProperties := make(map[string]interface{}) if err = json.Unmarshal(data, &additionalProperties); err == nil { - delete(additionalProperties, "hostnames") - delete(additionalProperties, "quantity") delete(additionalProperties, "metro") delete(additionalProperties, "always_pxe") delete(additionalProperties, "billing_cycle") @@ -1178,7 +1142,8 @@ func (o *InstancesBatchCreateInputBatchesInner) UnmarshalJSON(data []byte) (err delete(additionalProperties, "termination_time") delete(additionalProperties, "user_ssh_keys") delete(additionalProperties, "userdata") - delete(additionalProperties, "facility") + delete(additionalProperties, "hostnames") + delete(additionalProperties, "quantity") o.AdditionalProperties = additionalProperties } diff --git a/services/metalv1/model_interconnection.go b/services/metalv1/model_interconnection.go index ab158db8..14c96f08 100644 --- a/services/metalv1/model_interconnection.go +++ b/services/metalv1/model_interconnection.go @@ -20,7 +20,6 @@ var _ MappedNullable = &Interconnection{} type Interconnection struct { ContactEmail *string `json:"contact_email,omitempty"` Description *string `json:"description,omitempty"` - Facility *Facility `json:"facility,omitempty"` Id *string `json:"id,omitempty"` Metro *Metro `json:"metro,omitempty"` Mode *InterconnectionMode `json:"mode,omitempty"` @@ -131,38 +130,6 @@ func (o *Interconnection) SetDescription(v string) { o.Description = &v } -// GetFacility returns the Facility field value if set, zero value otherwise. -func (o *Interconnection) GetFacility() Facility { - if o == nil || IsNil(o.Facility) { - var ret Facility - return ret - } - return *o.Facility -} - -// GetFacilityOk returns a tuple with the Facility field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Interconnection) GetFacilityOk() (*Facility, bool) { - if o == nil || IsNil(o.Facility) { - return nil, false - } - return o.Facility, true -} - -// HasFacility returns a boolean if a field has been set. -func (o *Interconnection) HasFacility() bool { - if o != nil && !IsNil(o.Facility) { - return true - } - - return false -} - -// SetFacility gets a reference to the given Facility and assigns it to the Facility field. -func (o *Interconnection) SetFacility(v Facility) { - o.Facility = &v -} - // GetId returns the Id field value if set, zero value otherwise. func (o *Interconnection) GetId() string { if o == nil || IsNil(o.Id) { @@ -787,9 +754,6 @@ func (o Interconnection) ToMap() (map[string]interface{}, error) { if !IsNil(o.Description) { toSerialize["description"] = o.Description } - if !IsNil(o.Facility) { - toSerialize["facility"] = o.Facility - } if !IsNil(o.Id) { toSerialize["id"] = o.Id } @@ -871,7 +835,6 @@ func (o *Interconnection) UnmarshalJSON(data []byte) (err error) { if err = json.Unmarshal(data, &additionalProperties); err == nil { delete(additionalProperties, "contact_email") delete(additionalProperties, "description") - delete(additionalProperties, "facility") delete(additionalProperties, "id") delete(additionalProperties, "metro") delete(additionalProperties, "mode") diff --git a/services/metalv1/model_invitation.go b/services/metalv1/model_invitation.go index f0455310..b6d6eab4 100644 --- a/services/metalv1/model_invitation.go +++ b/services/metalv1/model_invitation.go @@ -29,6 +29,7 @@ type Invitation struct { Projects []Href `json:"projects,omitempty"` Roles []InvitationRolesInner `json:"roles,omitempty"` UpdatedAt *time.Time `json:"updated_at,omitempty"` + BoundRoles []string `json:"bound_roles,omitempty"` AdditionalProperties map[string]interface{} } @@ -403,6 +404,38 @@ func (o *Invitation) SetUpdatedAt(v time.Time) { o.UpdatedAt = &v } +// GetBoundRoles returns the BoundRoles field value if set, zero value otherwise. +func (o *Invitation) GetBoundRoles() []string { + if o == nil || IsNil(o.BoundRoles) { + var ret []string + return ret + } + return o.BoundRoles +} + +// GetBoundRolesOk returns a tuple with the BoundRoles field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Invitation) GetBoundRolesOk() ([]string, bool) { + if o == nil || IsNil(o.BoundRoles) { + return nil, false + } + return o.BoundRoles, true +} + +// HasBoundRoles returns a boolean if a field has been set. +func (o *Invitation) HasBoundRoles() bool { + if o != nil && !IsNil(o.BoundRoles) { + return true + } + + return false +} + +// SetBoundRoles gets a reference to the given []string and assigns it to the BoundRoles field. +func (o *Invitation) SetBoundRoles(v []string) { + o.BoundRoles = v +} + func (o Invitation) MarshalJSON() ([]byte, error) { toSerialize, err := o.ToMap() if err != nil { @@ -446,6 +479,9 @@ func (o Invitation) ToMap() (map[string]interface{}, error) { if !IsNil(o.UpdatedAt) { toSerialize["updated_at"] = o.UpdatedAt } + if !IsNil(o.BoundRoles) { + toSerialize["bound_roles"] = o.BoundRoles + } for key, value := range o.AdditionalProperties { toSerialize[key] = value @@ -479,6 +515,7 @@ func (o *Invitation) UnmarshalJSON(data []byte) (err error) { delete(additionalProperties, "projects") delete(additionalProperties, "roles") delete(additionalProperties, "updated_at") + delete(additionalProperties, "bound_roles") o.AdditionalProperties = additionalProperties } diff --git a/services/metalv1/model_invitation_input.go b/services/metalv1/model_invitation_input.go index e160885f..543c8277 100644 --- a/services/metalv1/model_invitation_input.go +++ b/services/metalv1/model_invitation_input.go @@ -23,6 +23,7 @@ type InvitationInput struct { OrganizationId *string `json:"organization_id,omitempty"` ProjectsIds []string `json:"projects_ids,omitempty"` Roles []InvitationRolesInner `json:"roles,omitempty"` + BoundRoles []string `json:"bound_roles,omitempty"` AdditionalProperties map[string]interface{} } @@ -198,6 +199,38 @@ func (o *InvitationInput) SetRoles(v []InvitationRolesInner) { o.Roles = v } +// GetBoundRoles returns the BoundRoles field value if set, zero value otherwise. +func (o *InvitationInput) GetBoundRoles() []string { + if o == nil || IsNil(o.BoundRoles) { + var ret []string + return ret + } + return o.BoundRoles +} + +// GetBoundRolesOk returns a tuple with the BoundRoles field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *InvitationInput) GetBoundRolesOk() ([]string, bool) { + if o == nil || IsNil(o.BoundRoles) { + return nil, false + } + return o.BoundRoles, true +} + +// HasBoundRoles returns a boolean if a field has been set. +func (o *InvitationInput) HasBoundRoles() bool { + if o != nil && !IsNil(o.BoundRoles) { + return true + } + + return false +} + +// SetBoundRoles gets a reference to the given []string and assigns it to the BoundRoles field. +func (o *InvitationInput) SetBoundRoles(v []string) { + o.BoundRoles = v +} + func (o InvitationInput) MarshalJSON() ([]byte, error) { toSerialize, err := o.ToMap() if err != nil { @@ -221,6 +254,9 @@ func (o InvitationInput) ToMap() (map[string]interface{}, error) { if !IsNil(o.Roles) { toSerialize["roles"] = o.Roles } + if !IsNil(o.BoundRoles) { + toSerialize["bound_roles"] = o.BoundRoles + } for key, value := range o.AdditionalProperties { toSerialize[key] = value @@ -269,6 +305,7 @@ func (o *InvitationInput) UnmarshalJSON(data []byte) (err error) { delete(additionalProperties, "organization_id") delete(additionalProperties, "projects_ids") delete(additionalProperties, "roles") + delete(additionalProperties, "bound_roles") o.AdditionalProperties = additionalProperties } diff --git a/services/metalv1/model_member.go b/services/metalv1/model_member.go new file mode 100644 index 00000000..be48090b --- /dev/null +++ b/services/metalv1/model_member.go @@ -0,0 +1,410 @@ +/* +Metal API + +Contact: support@equinixmetal.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package metalv1 + +import ( + "encoding/json" +) + +// checks if the Member type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Member{} + +// Member struct for Member +type Member struct { + Id *string `json:"id,omitempty"` + Roles []InvitationRolesInner `json:"roles,omitempty"` + ProjectsCount *int32 `json:"projects_count,omitempty"` + BoundRoles []string `json:"bound_roles,omitempty"` + User *Href `json:"user,omitempty"` + Organization *Href `json:"organization,omitempty"` + Projects []Href `json:"projects,omitempty"` + Href *string `json:"href,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _Member Member + +// NewMember instantiates a new Member object +// 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 NewMember() *Member { + this := Member{} + return &this +} + +// NewMemberWithDefaults instantiates a new Member object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewMemberWithDefaults() *Member { + this := Member{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *Member) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// 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 *Member) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *Member) 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 *Member) SetId(v string) { + o.Id = &v +} + +// GetRoles returns the Roles field value if set, zero value otherwise. +func (o *Member) GetRoles() []InvitationRolesInner { + if o == nil || IsNil(o.Roles) { + var ret []InvitationRolesInner + return ret + } + return o.Roles +} + +// GetRolesOk returns a tuple with the Roles field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Member) GetRolesOk() ([]InvitationRolesInner, bool) { + if o == nil || IsNil(o.Roles) { + return nil, false + } + return o.Roles, true +} + +// HasRoles returns a boolean if a field has been set. +func (o *Member) HasRoles() bool { + if o != nil && !IsNil(o.Roles) { + return true + } + + return false +} + +// SetRoles gets a reference to the given []InvitationRolesInner and assigns it to the Roles field. +func (o *Member) SetRoles(v []InvitationRolesInner) { + o.Roles = v +} + +// GetProjectsCount returns the ProjectsCount field value if set, zero value otherwise. +func (o *Member) GetProjectsCount() int32 { + if o == nil || IsNil(o.ProjectsCount) { + var ret int32 + return ret + } + return *o.ProjectsCount +} + +// GetProjectsCountOk returns a tuple with the ProjectsCount field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Member) GetProjectsCountOk() (*int32, bool) { + if o == nil || IsNil(o.ProjectsCount) { + return nil, false + } + return o.ProjectsCount, true +} + +// HasProjectsCount returns a boolean if a field has been set. +func (o *Member) HasProjectsCount() bool { + if o != nil && !IsNil(o.ProjectsCount) { + return true + } + + return false +} + +// SetProjectsCount gets a reference to the given int32 and assigns it to the ProjectsCount field. +func (o *Member) SetProjectsCount(v int32) { + o.ProjectsCount = &v +} + +// GetBoundRoles returns the BoundRoles field value if set, zero value otherwise. +func (o *Member) GetBoundRoles() []string { + if o == nil || IsNil(o.BoundRoles) { + var ret []string + return ret + } + return o.BoundRoles +} + +// GetBoundRolesOk returns a tuple with the BoundRoles field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Member) GetBoundRolesOk() ([]string, bool) { + if o == nil || IsNil(o.BoundRoles) { + return nil, false + } + return o.BoundRoles, true +} + +// HasBoundRoles returns a boolean if a field has been set. +func (o *Member) HasBoundRoles() bool { + if o != nil && !IsNil(o.BoundRoles) { + return true + } + + return false +} + +// SetBoundRoles gets a reference to the given []string and assigns it to the BoundRoles field. +func (o *Member) SetBoundRoles(v []string) { + o.BoundRoles = v +} + +// GetUser returns the User field value if set, zero value otherwise. +func (o *Member) GetUser() Href { + if o == nil || IsNil(o.User) { + var ret Href + return ret + } + return *o.User +} + +// GetUserOk returns a tuple with the User field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Member) GetUserOk() (*Href, bool) { + if o == nil || IsNil(o.User) { + return nil, false + } + return o.User, true +} + +// HasUser returns a boolean if a field has been set. +func (o *Member) HasUser() bool { + if o != nil && !IsNil(o.User) { + return true + } + + return false +} + +// SetUser gets a reference to the given Href and assigns it to the User field. +func (o *Member) SetUser(v Href) { + o.User = &v +} + +// GetOrganization returns the Organization field value if set, zero value otherwise. +func (o *Member) GetOrganization() Href { + if o == nil || IsNil(o.Organization) { + var ret Href + return ret + } + return *o.Organization +} + +// GetOrganizationOk returns a tuple with the Organization field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Member) GetOrganizationOk() (*Href, bool) { + if o == nil || IsNil(o.Organization) { + return nil, false + } + return o.Organization, true +} + +// HasOrganization returns a boolean if a field has been set. +func (o *Member) HasOrganization() bool { + if o != nil && !IsNil(o.Organization) { + return true + } + + return false +} + +// SetOrganization gets a reference to the given Href and assigns it to the Organization field. +func (o *Member) SetOrganization(v Href) { + o.Organization = &v +} + +// GetProjects returns the Projects field value if set, zero value otherwise. +func (o *Member) GetProjects() []Href { + if o == nil || IsNil(o.Projects) { + var ret []Href + return ret + } + return o.Projects +} + +// GetProjectsOk returns a tuple with the Projects field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Member) GetProjectsOk() ([]Href, bool) { + if o == nil || IsNil(o.Projects) { + return nil, false + } + return o.Projects, true +} + +// HasProjects returns a boolean if a field has been set. +func (o *Member) HasProjects() bool { + if o != nil && !IsNil(o.Projects) { + return true + } + + return false +} + +// SetProjects gets a reference to the given []Href and assigns it to the Projects field. +func (o *Member) SetProjects(v []Href) { + o.Projects = v +} + +// GetHref returns the Href field value if set, zero value otherwise. +func (o *Member) GetHref() string { + if o == nil || IsNil(o.Href) { + var ret string + return ret + } + return *o.Href +} + +// GetHrefOk returns a tuple with the Href field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Member) GetHrefOk() (*string, bool) { + if o == nil || IsNil(o.Href) { + return nil, false + } + return o.Href, true +} + +// HasHref returns a boolean if a field has been set. +func (o *Member) HasHref() bool { + if o != nil && !IsNil(o.Href) { + return true + } + + return false +} + +// SetHref gets a reference to the given string and assigns it to the Href field. +func (o *Member) SetHref(v string) { + o.Href = &v +} + +func (o Member) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Member) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.Roles) { + toSerialize["roles"] = o.Roles + } + if !IsNil(o.ProjectsCount) { + toSerialize["projects_count"] = o.ProjectsCount + } + if !IsNil(o.BoundRoles) { + toSerialize["bound_roles"] = o.BoundRoles + } + if !IsNil(o.User) { + toSerialize["user"] = o.User + } + if !IsNil(o.Organization) { + toSerialize["organization"] = o.Organization + } + if !IsNil(o.Projects) { + toSerialize["projects"] = o.Projects + } + if !IsNil(o.Href) { + toSerialize["href"] = o.Href + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *Member) UnmarshalJSON(data []byte) (err error) { + varMember := _Member{} + + err = json.Unmarshal(data, &varMember) + + if err != nil { + return err + } + + *o = Member(varMember) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "id") + delete(additionalProperties, "roles") + delete(additionalProperties, "projects_count") + delete(additionalProperties, "bound_roles") + delete(additionalProperties, "user") + delete(additionalProperties, "organization") + delete(additionalProperties, "projects") + delete(additionalProperties, "href") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableMember struct { + value *Member + isSet bool +} + +func (v NullableMember) Get() *Member { + return v.value +} + +func (v *NullableMember) Set(val *Member) { + v.value = val + v.isSet = true +} + +func (v NullableMember) IsSet() bool { + return v.isSet +} + +func (v *NullableMember) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMember(val *Member) *NullableMember { + return &NullableMember{value: val, isSet: true} +} + +func (v NullableMember) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMember) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/metalv1/model_member_list.go b/services/metalv1/model_member_list.go new file mode 100644 index 00000000..aedbc393 --- /dev/null +++ b/services/metalv1/model_member_list.go @@ -0,0 +1,151 @@ +/* +Metal API + +Contact: support@equinixmetal.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package metalv1 + +import ( + "encoding/json" +) + +// checks if the MemberList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &MemberList{} + +// MemberList struct for MemberList +type MemberList struct { + Members []Member `json:"members,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _MemberList MemberList + +// NewMemberList instantiates a new MemberList object +// 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 NewMemberList() *MemberList { + this := MemberList{} + return &this +} + +// NewMemberListWithDefaults instantiates a new MemberList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewMemberListWithDefaults() *MemberList { + this := MemberList{} + return &this +} + +// GetMembers returns the Members field value if set, zero value otherwise. +func (o *MemberList) GetMembers() []Member { + if o == nil || IsNil(o.Members) { + var ret []Member + return ret + } + return o.Members +} + +// GetMembersOk returns a tuple with the Members field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MemberList) GetMembersOk() ([]Member, bool) { + if o == nil || IsNil(o.Members) { + return nil, false + } + return o.Members, true +} + +// HasMembers returns a boolean if a field has been set. +func (o *MemberList) HasMembers() bool { + if o != nil && !IsNil(o.Members) { + return true + } + + return false +} + +// SetMembers gets a reference to the given []Member and assigns it to the Members field. +func (o *MemberList) SetMembers(v []Member) { + o.Members = v +} + +func (o MemberList) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o MemberList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Members) { + toSerialize["members"] = o.Members + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *MemberList) UnmarshalJSON(data []byte) (err error) { + varMemberList := _MemberList{} + + err = json.Unmarshal(data, &varMemberList) + + if err != nil { + return err + } + + *o = MemberList(varMemberList) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "members") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableMemberList struct { + value *MemberList + isSet bool +} + +func (v NullableMemberList) Get() *MemberList { + return v.value +} + +func (v *NullableMemberList) Set(val *MemberList) { + v.value = val + v.isSet = true +} + +func (v NullableMemberList) IsSet() bool { + return v.isSet +} + +func (v *NullableMemberList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMemberList(val *MemberList) *NullableMemberList { + return &NullableMemberList{value: val, isSet: true} +} + +func (v NullableMemberList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMemberList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/metalv1/model_member_update_input.go b/services/metalv1/model_member_update_input.go new file mode 100644 index 00000000..f3db450a --- /dev/null +++ b/services/metalv1/model_member_update_input.go @@ -0,0 +1,228 @@ +/* +Metal API + +Contact: support@equinixmetal.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package metalv1 + +import ( + "encoding/json" +) + +// checks if the MemberUpdateInput type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &MemberUpdateInput{} + +// MemberUpdateInput struct for MemberUpdateInput +type MemberUpdateInput struct { + // Primary role for the user within the organization + Role []InvitationRolesInner `json:"role,omitempty"` + // Additional roles that can be bound to the user to grant extra permissions. + BoundRoles []string `json:"bound_roles,omitempty"` + // Project IDs the user should be able to access. This field is only required when role is set to `collaborator` or `limited_collaborator`. + ProjectIds []string `json:"project_ids,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _MemberUpdateInput MemberUpdateInput + +// NewMemberUpdateInput instantiates a new MemberUpdateInput object +// 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 NewMemberUpdateInput() *MemberUpdateInput { + this := MemberUpdateInput{} + return &this +} + +// NewMemberUpdateInputWithDefaults instantiates a new MemberUpdateInput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewMemberUpdateInputWithDefaults() *MemberUpdateInput { + this := MemberUpdateInput{} + return &this +} + +// GetRole returns the Role field value if set, zero value otherwise. +func (o *MemberUpdateInput) GetRole() []InvitationRolesInner { + if o == nil || IsNil(o.Role) { + var ret []InvitationRolesInner + return ret + } + return o.Role +} + +// GetRoleOk returns a tuple with the Role field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MemberUpdateInput) GetRoleOk() ([]InvitationRolesInner, bool) { + if o == nil || IsNil(o.Role) { + return nil, false + } + return o.Role, true +} + +// HasRole returns a boolean if a field has been set. +func (o *MemberUpdateInput) HasRole() bool { + if o != nil && !IsNil(o.Role) { + return true + } + + return false +} + +// SetRole gets a reference to the given []InvitationRolesInner and assigns it to the Role field. +func (o *MemberUpdateInput) SetRole(v []InvitationRolesInner) { + o.Role = v +} + +// GetBoundRoles returns the BoundRoles field value if set, zero value otherwise. +func (o *MemberUpdateInput) GetBoundRoles() []string { + if o == nil || IsNil(o.BoundRoles) { + var ret []string + return ret + } + return o.BoundRoles +} + +// GetBoundRolesOk returns a tuple with the BoundRoles field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MemberUpdateInput) GetBoundRolesOk() ([]string, bool) { + if o == nil || IsNil(o.BoundRoles) { + return nil, false + } + return o.BoundRoles, true +} + +// HasBoundRoles returns a boolean if a field has been set. +func (o *MemberUpdateInput) HasBoundRoles() bool { + if o != nil && !IsNil(o.BoundRoles) { + return true + } + + return false +} + +// SetBoundRoles gets a reference to the given []string and assigns it to the BoundRoles field. +func (o *MemberUpdateInput) SetBoundRoles(v []string) { + o.BoundRoles = v +} + +// GetProjectIds returns the ProjectIds field value if set, zero value otherwise. +func (o *MemberUpdateInput) GetProjectIds() []string { + if o == nil || IsNil(o.ProjectIds) { + var ret []string + return ret + } + return o.ProjectIds +} + +// GetProjectIdsOk returns a tuple with the ProjectIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MemberUpdateInput) GetProjectIdsOk() ([]string, bool) { + if o == nil || IsNil(o.ProjectIds) { + return nil, false + } + return o.ProjectIds, true +} + +// HasProjectIds returns a boolean if a field has been set. +func (o *MemberUpdateInput) HasProjectIds() bool { + if o != nil && !IsNil(o.ProjectIds) { + return true + } + + return false +} + +// SetProjectIds gets a reference to the given []string and assigns it to the ProjectIds field. +func (o *MemberUpdateInput) SetProjectIds(v []string) { + o.ProjectIds = v +} + +func (o MemberUpdateInput) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o MemberUpdateInput) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Role) { + toSerialize["role"] = o.Role + } + if !IsNil(o.BoundRoles) { + toSerialize["bound_roles"] = o.BoundRoles + } + if !IsNil(o.ProjectIds) { + toSerialize["project_ids"] = o.ProjectIds + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *MemberUpdateInput) UnmarshalJSON(data []byte) (err error) { + varMemberUpdateInput := _MemberUpdateInput{} + + err = json.Unmarshal(data, &varMemberUpdateInput) + + if err != nil { + return err + } + + *o = MemberUpdateInput(varMemberUpdateInput) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "role") + delete(additionalProperties, "bound_roles") + delete(additionalProperties, "project_ids") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableMemberUpdateInput struct { + value *MemberUpdateInput + isSet bool +} + +func (v NullableMemberUpdateInput) Get() *MemberUpdateInput { + return v.value +} + +func (v *NullableMemberUpdateInput) Set(val *MemberUpdateInput) { + v.value = val + v.isSet = true +} + +func (v NullableMemberUpdateInput) IsSet() bool { + return v.isSet +} + +func (v *NullableMemberUpdateInput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMemberUpdateInput(val *MemberUpdateInput) *NullableMemberUpdateInput { + return &NullableMemberUpdateInput{value: val, isSet: true} +} + +func (v NullableMemberUpdateInput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMemberUpdateInput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/metalv1/model_membership.go b/services/metalv1/model_membership.go index 529766c1..06642bbd 100644 --- a/services/metalv1/model_membership.go +++ b/services/metalv1/model_membership.go @@ -25,6 +25,7 @@ type Membership struct { Roles []string `json:"roles,omitempty"` UpdatedAt *time.Time `json:"updated_at,omitempty"` User *Href `json:"user,omitempty"` + BoundRoles []string `json:"bound_roles,omitempty"` AdditionalProperties map[string]interface{} } @@ -271,6 +272,38 @@ func (o *Membership) SetUser(v Href) { o.User = &v } +// GetBoundRoles returns the BoundRoles field value if set, zero value otherwise. +func (o *Membership) GetBoundRoles() []string { + if o == nil || IsNil(o.BoundRoles) { + var ret []string + return ret + } + return o.BoundRoles +} + +// GetBoundRolesOk returns a tuple with the BoundRoles field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Membership) GetBoundRolesOk() ([]string, bool) { + if o == nil || IsNil(o.BoundRoles) { + return nil, false + } + return o.BoundRoles, true +} + +// HasBoundRoles returns a boolean if a field has been set. +func (o *Membership) HasBoundRoles() bool { + if o != nil && !IsNil(o.BoundRoles) { + return true + } + + return false +} + +// SetBoundRoles gets a reference to the given []string and assigns it to the BoundRoles field. +func (o *Membership) SetBoundRoles(v []string) { + o.BoundRoles = v +} + func (o Membership) MarshalJSON() ([]byte, error) { toSerialize, err := o.ToMap() if err != nil { @@ -302,6 +335,9 @@ func (o Membership) ToMap() (map[string]interface{}, error) { if !IsNil(o.User) { toSerialize["user"] = o.User } + if !IsNil(o.BoundRoles) { + toSerialize["bound_roles"] = o.BoundRoles + } for key, value := range o.AdditionalProperties { toSerialize[key] = value @@ -331,6 +367,7 @@ func (o *Membership) UnmarshalJSON(data []byte) (err error) { delete(additionalProperties, "roles") delete(additionalProperties, "updated_at") delete(additionalProperties, "user") + delete(additionalProperties, "bound_roles") o.AdditionalProperties = additionalProperties } diff --git a/services/metalv1/model_metro_input.go b/services/metalv1/model_metro_input.go index e204be4e..721a4e67 100644 --- a/services/metalv1/model_metro_input.go +++ b/services/metalv1/model_metro_input.go @@ -18,8 +18,7 @@ var _ MappedNullable = &MetroInput{} // MetroInput struct for MetroInput type MetroInput struct { - // Metro code or ID of where the device should be provisioned in, or it can be instructed to create the device in the best available metro with `{ \"metro\": \"any\" }`. The special metro value of any means anywhere, any metro. When any is chosen in the request, the metro location is picked per our scheduling algorithms that favor the following factors: hardware reservation location (if requesting reserved hardware), ip reservations, spot instances, etc. The any keyword *does not* optimize for cost, this means that usage costs (instance, transfer, other features dependent on location) will vary. Please check metro value in response to see where the device was created. Either metro or facility must be provided. - Metro string `json:"metro"` + Metro MetroInputMetro `json:"metro"` AdditionalProperties map[string]interface{} } @@ -29,7 +28,7 @@ type _MetroInput MetroInput // 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 NewMetroInput(metro string) *MetroInput { +func NewMetroInput(metro MetroInputMetro) *MetroInput { this := MetroInput{} this.Metro = metro return &this @@ -44,9 +43,9 @@ func NewMetroInputWithDefaults() *MetroInput { } // GetMetro returns the Metro field value -func (o *MetroInput) GetMetro() string { +func (o *MetroInput) GetMetro() MetroInputMetro { if o == nil { - var ret string + var ret MetroInputMetro return ret } @@ -55,7 +54,7 @@ func (o *MetroInput) GetMetro() string { // GetMetroOk returns a tuple with the Metro field value // and a boolean to check if the value has been set. -func (o *MetroInput) GetMetroOk() (*string, bool) { +func (o *MetroInput) GetMetroOk() (*MetroInputMetro, bool) { if o == nil { return nil, false } @@ -63,7 +62,7 @@ func (o *MetroInput) GetMetroOk() (*string, bool) { } // SetMetro sets field value -func (o *MetroInput) SetMetro(v string) { +func (o *MetroInput) SetMetro(v MetroInputMetro) { o.Metro = v } diff --git a/services/metalv1/model_metro_input_metro.go b/services/metalv1/model_metro_input_metro.go new file mode 100644 index 00000000..53f0c9d3 --- /dev/null +++ b/services/metalv1/model_metro_input_metro.go @@ -0,0 +1,103 @@ +/* +Metal API + +Contact: support@equinixmetal.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package metalv1 + +import ( + "encoding/json" + "fmt" +) + +// MetroInputMetro Metro code or ID of where the device should be provisioned in, or it can be instructed to create the device in the best available metro with `{ \"metro\": \"any\" }`. The special metro value of any means anywhere, any metro. When any is chosen in the request, the metro location is picked per our scheduling algorithms that favor the following factors: hardware reservation location (if requesting reserved hardware), ip reservations, spot instances, etc. The any keyword *does not* optimize for cost, this means that usage costs (instance, transfer, other features dependent on location) will vary. Please check metro value in response to see where the device was created. Additionally it is possible to set a prioritized location selection. For example `{ \"metro\": [\"m3\", \"m2\", \"any\"] }` can be used to prioritize `m3` and then `m2` before accepting `any` metro. If none of the metros provided have availability for the requested device the request will fail. Either metro or facility must be provided. +type MetroInputMetro struct { + []string *[]string + string *string +} + +// Unmarshal JSON data into any of the pointers in the struct +func (dst *MetroInputMetro) UnmarshalJSON(data []byte) error { + var err error + // try to unmarshal JSON data into []string + err = json.Unmarshal(data, &dst.[]string); + if err == nil { + json[]string, _ := json.Marshal(dst.[]string) + if string(json[]string) == "{}" { // empty struct + dst.[]string = nil + } else { + return nil // data stored in dst.[]string, return on the first match + } + } else { + dst.[]string = nil + } + + // try to unmarshal JSON data into string + err = json.Unmarshal(data, &dst.string); + if err == nil { + jsonstring, _ := json.Marshal(dst.string) + if string(jsonstring) == "{}" { // empty struct + dst.string = nil + } else { + return nil // data stored in dst.string, return on the first match + } + } else { + dst.string = nil + } + + return fmt.Errorf("data failed to match schemas in anyOf(MetroInputMetro)") +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src *MetroInputMetro) MarshalJSON() ([]byte, error) { + if src.[]string != nil { + return json.Marshal(&src.[]string) + } + + if src.string != nil { + return json.Marshal(&src.string) + } + + return nil, nil // no data in anyOf schemas +} + +type NullableMetroInputMetro struct { + value *MetroInputMetro + isSet bool +} + +func (v NullableMetroInputMetro) Get() *MetroInputMetro { + return v.value +} + +func (v *NullableMetroInputMetro) Set(val *MetroInputMetro) { + v.value = val + v.isSet = true +} + +func (v NullableMetroInputMetro) IsSet() bool { + return v.isSet +} + +func (v *NullableMetroInputMetro) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMetroInputMetro(val *MetroInputMetro) *NullableMetroInputMetro { + return &NullableMetroInputMetro{value: val, isSet: true} +} + +func (v NullableMetroInputMetro) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMetroInputMetro) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/services/metalv1/model_operating_system.go b/services/metalv1/model_operating_system.go index f0e41267..95aa8adf 100644 --- a/services/metalv1/model_operating_system.go +++ b/services/metalv1/model_operating_system.go @@ -17,30 +17,30 @@ var _ MappedNullable = &OperatingSystem{} // OperatingSystem struct for OperatingSystem type OperatingSystem struct { - // The date on which the current OS image was build and released + // The date when Metal's current OS image was built and released. BuildDate *string `json:"build_date,omitempty"` - // The date when the OS is deprecated + // The date when the OS is deprecated. This is the date set by the upstream operating system maintainer. DeprecationDate *string `json:"deprecation_date,omitempty"` Distro *string `json:"distro,omitempty"` DistroLabel *string `json:"distro_label,omitempty"` - // The OS no longer receives any updates and may be disabled at any time + // The date when the Metal OS image no longer receives any updates and may be disabled at any time. Typically the same as the deprecation date set by the upstream OS maintainers. EndOfLifeDate *string `json:"end_of_life_date,omitempty"` - // When the OS is nearing end of life, typically 30 days before end of life + // Metal-set date for when the OS is nearing end of life, typically 30 days before end of life. EndOfServiceDate *string `json:"end_of_service_date,omitempty"` Id *string `json:"id,omitempty"` - // Licenced OS is priced according to pricing property + // Indicates if the OS is licensed or not. Licensed operating systems are priced according to pricing property. Licensed *bool `json:"licensed,omitempty"` - // Where in the support lifecycle the OS is + // Where in the lifecycle the OS image is. Possible states are - `\"testing\"`, `\"pre_release\"`, `\"active\"`, `\"deprecated\"`, `\"end_of_service\"`, or `\"end_of_life\"`. LifecycleState *string `json:"lifecycle_state,omitempty"` Name *string `json:"name,omitempty"` - // Servers can be already preinstalled with OS in order to shorten provision time. + // Indicates whether servers can be preinstalled with OS image in order to shorten provision time. Preinstallable *bool `json:"preinstallable,omitempty"` - // This object contains price per time unit and optional multiplier value if licence price depends on hardware plan or components (e.g. number of cores) + // This object contains price per time unit and optional multiplier value if license price depends on hardware plan or components (e.g. number of cores). Pricing map[string]interface{} `json:"pricing,omitempty"` ProvisionableOn []string `json:"provisionable_on,omitempty"` - // The date when the OS was released + // The date the upstream operating system maintainer released this version of the OS. ReleaseDate *string `json:"release_date,omitempty"` - // The current release notes for this OS image, typically in Markdown format + // The current release notes for this OS image, typically in Markdown format. ReleaseNotes *string `json:"release_notes,omitempty"` Slug *string `json:"slug,omitempty"` Version *string `json:"version,omitempty"` diff --git a/services/metalv1/model_project_create_from_root_input_type.go b/services/metalv1/model_project_create_from_root_input_type.go index 21f19441..49ceae98 100644 --- a/services/metalv1/model_project_create_from_root_input_type.go +++ b/services/metalv1/model_project_create_from_root_input_type.go @@ -13,19 +13,17 @@ import ( "fmt" ) -// ProjectCreateFromRootInputType The type of the project. If no type is specified the project type will automatically be `default` Projects of type 'vmce' are part of an in development feature and not available to all customers. +// ProjectCreateFromRootInputType The type of the project. If no type is specified the project type will automatically be `default` type ProjectCreateFromRootInputType string // List of ProjectCreateFromRootInput_type const ( PROJECTCREATEFROMROOTINPUTTYPE_DEFAULT ProjectCreateFromRootInputType = "default" - PROJECTCREATEFROMROOTINPUTTYPE_VMCE ProjectCreateFromRootInputType = "vmce" ) // All allowed values of ProjectCreateFromRootInputType enum var AllowedProjectCreateFromRootInputTypeEnumValues = []ProjectCreateFromRootInputType{ "default", - "vmce", } func (v *ProjectCreateFromRootInputType) UnmarshalJSON(src []byte) error { diff --git a/services/metalv1/model_project_type.go b/services/metalv1/model_project_type.go index fe19e6ba..399cc260 100644 --- a/services/metalv1/model_project_type.go +++ b/services/metalv1/model_project_type.go @@ -13,19 +13,17 @@ import ( "fmt" ) -// ProjectType The type of the project. Projects of type `vmce` are part of an in development feature and not available to all customers. +// ProjectType The type of the project. type ProjectType string // List of Project_type const ( PROJECTTYPE_DEFAULT ProjectType = "default" - PROJECTTYPE_VMCE ProjectType = "vmce" ) // All allowed values of ProjectType enum var AllowedProjectTypeEnumValues = []ProjectType{ "default", - "vmce", } func (v *ProjectType) UnmarshalJSON(src []byte) error { diff --git a/services/metalv1/model_role.go b/services/metalv1/model_role.go new file mode 100644 index 00000000..b16a2fc4 --- /dev/null +++ b/services/metalv1/model_role.go @@ -0,0 +1,225 @@ +/* +Metal API + +Contact: support@equinixmetal.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package metalv1 + +import ( + "encoding/json" +) + +// checks if the Role type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Role{} + +// Role struct for Role +type Role struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Actions []string `json:"actions,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _Role Role + +// NewRole instantiates a new Role object +// 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 NewRole() *Role { + this := Role{} + return &this +} + +// NewRoleWithDefaults instantiates a new Role object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRoleWithDefaults() *Role { + this := Role{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *Role) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// 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 *Role) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *Role) 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 *Role) SetId(v string) { + o.Id = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *Role) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// 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 *Role) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *Role) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *Role) SetName(v string) { + o.Name = &v +} + +// GetActions returns the Actions field value if set, zero value otherwise. +func (o *Role) GetActions() []string { + if o == nil || IsNil(o.Actions) { + var ret []string + return ret + } + return o.Actions +} + +// GetActionsOk returns a tuple with the Actions field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Role) GetActionsOk() ([]string, bool) { + if o == nil || IsNil(o.Actions) { + return nil, false + } + return o.Actions, true +} + +// HasActions returns a boolean if a field has been set. +func (o *Role) HasActions() bool { + if o != nil && !IsNil(o.Actions) { + return true + } + + return false +} + +// SetActions gets a reference to the given []string and assigns it to the Actions field. +func (o *Role) SetActions(v []string) { + o.Actions = v +} + +func (o Role) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Role) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Actions) { + toSerialize["actions"] = o.Actions + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *Role) UnmarshalJSON(data []byte) (err error) { + varRole := _Role{} + + err = json.Unmarshal(data, &varRole) + + if err != nil { + return err + } + + *o = Role(varRole) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "id") + delete(additionalProperties, "name") + delete(additionalProperties, "actions") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableRole struct { + value *Role + isSet bool +} + +func (v NullableRole) Get() *Role { + return v.value +} + +func (v *NullableRole) Set(val *Role) { + v.value = val + v.isSet = true +} + +func (v NullableRole) IsSet() bool { + return v.isSet +} + +func (v *NullableRole) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRole(val *Role) *NullableRole { + return &NullableRole{value: val, isSet: true} +} + +func (v NullableRole) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRole) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/metalv1/model_role_list.go b/services/metalv1/model_role_list.go new file mode 100644 index 00000000..71a6e3ca --- /dev/null +++ b/services/metalv1/model_role_list.go @@ -0,0 +1,151 @@ +/* +Metal API + +Contact: support@equinixmetal.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package metalv1 + +import ( + "encoding/json" +) + +// checks if the RoleList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RoleList{} + +// RoleList struct for RoleList +type RoleList struct { + Roles map[string]interface{} `json:"roles,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _RoleList RoleList + +// NewRoleList instantiates a new RoleList object +// 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 NewRoleList() *RoleList { + this := RoleList{} + return &this +} + +// NewRoleListWithDefaults instantiates a new RoleList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRoleListWithDefaults() *RoleList { + this := RoleList{} + return &this +} + +// GetRoles returns the Roles field value if set, zero value otherwise. +func (o *RoleList) GetRoles() map[string]interface{} { + if o == nil || IsNil(o.Roles) { + var ret map[string]interface{} + return ret + } + return o.Roles +} + +// GetRolesOk returns a tuple with the Roles field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RoleList) GetRolesOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Roles) { + return map[string]interface{}{}, false + } + return o.Roles, true +} + +// HasRoles returns a boolean if a field has been set. +func (o *RoleList) HasRoles() bool { + if o != nil && !IsNil(o.Roles) { + return true + } + + return false +} + +// SetRoles gets a reference to the given map[string]interface{} and assigns it to the Roles field. +func (o *RoleList) SetRoles(v map[string]interface{}) { + o.Roles = v +} + +func (o RoleList) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RoleList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Roles) { + toSerialize["roles"] = o.Roles + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *RoleList) UnmarshalJSON(data []byte) (err error) { + varRoleList := _RoleList{} + + err = json.Unmarshal(data, &varRoleList) + + if err != nil { + return err + } + + *o = RoleList(varRoleList) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "roles") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableRoleList struct { + value *RoleList + isSet bool +} + +func (v NullableRoleList) Get() *RoleList { + return v.value +} + +func (v *NullableRoleList) Set(val *RoleList) { + v.value = val + v.isSet = true +} + +func (v NullableRoleList) IsSet() bool { + return v.isSet +} + +func (v *NullableRoleList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRoleList(val *RoleList) *NullableRoleList { + return &NullableRoleList{value: val, isSet: true} +} + +func (v NullableRoleList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRoleList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/metalv1/model_server_info.go b/services/metalv1/model_server_info.go index 9862942b..c8d24995 100644 --- a/services/metalv1/model_server_info.go +++ b/services/metalv1/model_server_info.go @@ -17,8 +17,6 @@ var _ MappedNullable = &ServerInfo{} // ServerInfo struct for ServerInfo type ServerInfo struct { - // Deprecated - Facility *string `json:"facility,omitempty"` // The metro ID or code to check the capacity in. Metro *string `json:"metro,omitempty"` // The plan ID or slug to check the capacity of. @@ -47,41 +45,6 @@ func NewServerInfoWithDefaults() *ServerInfo { return &this } -// GetFacility returns the Facility field value if set, zero value otherwise. -// Deprecated -func (o *ServerInfo) GetFacility() string { - if o == nil || IsNil(o.Facility) { - var ret string - return ret - } - return *o.Facility -} - -// GetFacilityOk returns a tuple with the Facility field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated -func (o *ServerInfo) GetFacilityOk() (*string, bool) { - if o == nil || IsNil(o.Facility) { - return nil, false - } - return o.Facility, true -} - -// HasFacility returns a boolean if a field has been set. -func (o *ServerInfo) HasFacility() bool { - if o != nil && !IsNil(o.Facility) { - return true - } - - return false -} - -// SetFacility gets a reference to the given string and assigns it to the Facility field. -// Deprecated -func (o *ServerInfo) SetFacility(v string) { - o.Facility = &v -} - // GetMetro returns the Metro field value if set, zero value otherwise. func (o *ServerInfo) GetMetro() string { if o == nil || IsNil(o.Metro) { @@ -188,9 +151,6 @@ func (o ServerInfo) MarshalJSON() ([]byte, error) { func (o ServerInfo) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.Facility) { - toSerialize["facility"] = o.Facility - } if !IsNil(o.Metro) { toSerialize["metro"] = o.Metro } @@ -222,7 +182,6 @@ func (o *ServerInfo) UnmarshalJSON(data []byte) (err error) { additionalProperties := make(map[string]interface{}) if err = json.Unmarshal(data, &additionalProperties); err == nil { - delete(additionalProperties, "facility") delete(additionalProperties, "metro") delete(additionalProperties, "plan") delete(additionalProperties, "quantity") diff --git a/services/metalv1/model_spot_market_request_create_input.go b/services/metalv1/model_spot_market_request_create_input.go index d7694247..ca12333e 100644 --- a/services/metalv1/model_spot_market_request_create_input.go +++ b/services/metalv1/model_spot_market_request_create_input.go @@ -18,11 +18,9 @@ var _ MappedNullable = &SpotMarketRequestCreateInput{} // SpotMarketRequestCreateInput struct for SpotMarketRequestCreateInput type SpotMarketRequestCreateInput struct { - DevicesMax *int32 `json:"devices_max,omitempty"` - DevicesMin *int32 `json:"devices_min,omitempty"` - EndAt *time.Time `json:"end_at,omitempty"` - // Deprecated - Facilities []string `json:"facilities,omitempty"` + DevicesMax *int32 `json:"devices_max,omitempty"` + DevicesMin *int32 `json:"devices_min,omitempty"` + EndAt *time.Time `json:"end_at,omitempty"` InstanceParameters *SpotMarketRequestCreateInputInstanceParameters `json:"instance_parameters,omitempty"` MaxBidPrice *float32 `json:"max_bid_price,omitempty"` // The metro ID or code the spot market request will be created in. @@ -145,41 +143,6 @@ func (o *SpotMarketRequestCreateInput) SetEndAt(v time.Time) { o.EndAt = &v } -// GetFacilities returns the Facilities field value if set, zero value otherwise. -// Deprecated -func (o *SpotMarketRequestCreateInput) GetFacilities() []string { - if o == nil || IsNil(o.Facilities) { - var ret []string - return ret - } - return o.Facilities -} - -// GetFacilitiesOk returns a tuple with the Facilities field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated -func (o *SpotMarketRequestCreateInput) GetFacilitiesOk() ([]string, bool) { - if o == nil || IsNil(o.Facilities) { - return nil, false - } - return o.Facilities, true -} - -// HasFacilities returns a boolean if a field has been set. -func (o *SpotMarketRequestCreateInput) HasFacilities() bool { - if o != nil && !IsNil(o.Facilities) { - return true - } - - return false -} - -// SetFacilities gets a reference to the given []string and assigns it to the Facilities field. -// Deprecated -func (o *SpotMarketRequestCreateInput) SetFacilities(v []string) { - o.Facilities = v -} - // GetInstanceParameters returns the InstanceParameters field value if set, zero value otherwise. func (o *SpotMarketRequestCreateInput) GetInstanceParameters() SpotMarketRequestCreateInputInstanceParameters { if o == nil || IsNil(o.InstanceParameters) { @@ -295,9 +258,6 @@ func (o SpotMarketRequestCreateInput) ToMap() (map[string]interface{}, error) { if !IsNil(o.EndAt) { toSerialize["end_at"] = o.EndAt } - if !IsNil(o.Facilities) { - toSerialize["facilities"] = o.Facilities - } if !IsNil(o.InstanceParameters) { toSerialize["instance_parameters"] = o.InstanceParameters } @@ -332,7 +292,6 @@ func (o *SpotMarketRequestCreateInput) UnmarshalJSON(data []byte) (err error) { delete(additionalProperties, "devices_max") delete(additionalProperties, "devices_min") delete(additionalProperties, "end_at") - delete(additionalProperties, "facilities") delete(additionalProperties, "instance_parameters") delete(additionalProperties, "max_bid_price") delete(additionalProperties, "metro") diff --git a/services/metalv1/model_virtual_network_create_input.go b/services/metalv1/model_virtual_network_create_input.go index f1b97e97..2bb165b8 100644 --- a/services/metalv1/model_virtual_network_create_input.go +++ b/services/metalv1/model_virtual_network_create_input.go @@ -18,9 +18,6 @@ var _ MappedNullable = &VirtualNetworkCreateInput{} // VirtualNetworkCreateInput struct for VirtualNetworkCreateInput type VirtualNetworkCreateInput struct { Description *string `json:"description,omitempty"` - // The UUID (or facility code) for the Facility in which to create this Virtual network. - // Deprecated - Facility *string `json:"facility,omitempty"` // The UUID (or metro code) for the Metro in which to create this Virtual Network. Metro *string `json:"metro,omitempty"` // VLAN ID between 2-3999. Must be unique for the project within the Metro in which this Virtual Network is being created. If no value is specified, the next-available VLAN ID in the range 1000-1999 will be automatically selected. @@ -80,41 +77,6 @@ func (o *VirtualNetworkCreateInput) SetDescription(v string) { o.Description = &v } -// GetFacility returns the Facility field value if set, zero value otherwise. -// Deprecated -func (o *VirtualNetworkCreateInput) GetFacility() string { - if o == nil || IsNil(o.Facility) { - var ret string - return ret - } - return *o.Facility -} - -// GetFacilityOk returns a tuple with the Facility field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated -func (o *VirtualNetworkCreateInput) GetFacilityOk() (*string, bool) { - if o == nil || IsNil(o.Facility) { - return nil, false - } - return o.Facility, true -} - -// HasFacility returns a boolean if a field has been set. -func (o *VirtualNetworkCreateInput) HasFacility() bool { - if o != nil && !IsNil(o.Facility) { - return true - } - - return false -} - -// SetFacility gets a reference to the given string and assigns it to the Facility field. -// Deprecated -func (o *VirtualNetworkCreateInput) SetFacility(v string) { - o.Facility = &v -} - // GetMetro returns the Metro field value if set, zero value otherwise. func (o *VirtualNetworkCreateInput) GetMetro() string { if o == nil || IsNil(o.Metro) { @@ -224,9 +186,6 @@ func (o VirtualNetworkCreateInput) ToMap() (map[string]interface{}, error) { if !IsNil(o.Description) { toSerialize["description"] = o.Description } - if !IsNil(o.Facility) { - toSerialize["facility"] = o.Facility - } if !IsNil(o.Metro) { toSerialize["metro"] = o.Metro } @@ -259,7 +218,6 @@ func (o *VirtualNetworkCreateInput) UnmarshalJSON(data []byte) (err error) { if err = json.Unmarshal(data, &additionalProperties); err == nil { delete(additionalProperties, "description") - delete(additionalProperties, "facility") delete(additionalProperties, "metro") delete(additionalProperties, "vxlan") delete(additionalProperties, "tags") diff --git a/services/metalv1/model_vlan_fabric_vc_create_input.go b/services/metalv1/model_vlan_fabric_vc_create_input.go index 6312c051..dc7c7f3a 100644 --- a/services/metalv1/model_vlan_fabric_vc_create_input.go +++ b/services/metalv1/model_vlan_fabric_vc_create_input.go @@ -21,7 +21,6 @@ type VlanFabricVcCreateInput struct { // The preferred email used for communication and notifications about the Equinix Fabric interconnection. Optional and defaults to the primary user email address when using a User API key or the organization owner email address when using a Project API key. ContactEmail *string `json:"contact_email,omitempty"` Description *string `json:"description,omitempty"` - FacilityId *string `json:"facility_id,omitempty"` // A Metro ID or code. When creating Fabric VCs (Metal Billed), this is where interconnection will be originating from, as we pre-authorize the use of one of our shared ports as the origin of the interconnection using A-Side service tokens. We only allow local connections for Fabric VCs (Metal Billed), so the destination location must be the same as the origin. For Fabric VCs (Fabric Billed), or shared connections, this will be the destination of the interconnection. We allow remote connections for Fabric VCs (Fabric Billed), so the origin of the interconnection can be a different metro set here. Metro string `json:"metro"` Name string `json:"name"` @@ -127,38 +126,6 @@ func (o *VlanFabricVcCreateInput) SetDescription(v string) { o.Description = &v } -// GetFacilityId returns the FacilityId field value if set, zero value otherwise. -func (o *VlanFabricVcCreateInput) GetFacilityId() string { - if o == nil || IsNil(o.FacilityId) { - var ret string - return ret - } - return *o.FacilityId -} - -// GetFacilityIdOk returns a tuple with the FacilityId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *VlanFabricVcCreateInput) GetFacilityIdOk() (*string, bool) { - if o == nil || IsNil(o.FacilityId) { - return nil, false - } - return o.FacilityId, true -} - -// HasFacilityId returns a boolean if a field has been set. -func (o *VlanFabricVcCreateInput) HasFacilityId() bool { - if o != nil && !IsNil(o.FacilityId) { - return true - } - - return false -} - -// SetFacilityId gets a reference to the given string and assigns it to the FacilityId field. -func (o *VlanFabricVcCreateInput) SetFacilityId(v string) { - o.FacilityId = &v -} - // GetMetro returns the Metro field value func (o *VlanFabricVcCreateInput) GetMetro() string { if o == nil { @@ -415,9 +382,6 @@ func (o VlanFabricVcCreateInput) ToMap() (map[string]interface{}, error) { if !IsNil(o.Description) { toSerialize["description"] = o.Description } - if !IsNil(o.FacilityId) { - toSerialize["facility_id"] = o.FacilityId - } toSerialize["metro"] = o.Metro toSerialize["name"] = o.Name if !IsNil(o.Project) { @@ -483,7 +447,6 @@ func (o *VlanFabricVcCreateInput) UnmarshalJSON(data []byte) (err error) { if err = json.Unmarshal(data, &additionalProperties); err == nil { delete(additionalProperties, "contact_email") delete(additionalProperties, "description") - delete(additionalProperties, "facility_id") delete(additionalProperties, "metro") delete(additionalProperties, "name") delete(additionalProperties, "project") diff --git a/services/metalv1/model_vrf_fabric_vc_create_input.go b/services/metalv1/model_vrf_fabric_vc_create_input.go index 8324c92a..1bc2e68f 100644 --- a/services/metalv1/model_vrf_fabric_vc_create_input.go +++ b/services/metalv1/model_vrf_fabric_vc_create_input.go @@ -21,7 +21,6 @@ type VrfFabricVcCreateInput struct { // The preferred email used for communication and notifications about the Equinix Fabric interconnection. Optional and defaults to the primary user email address when using a User API key or the organization owner email address when using a Project API key. ContactEmail *string `json:"contact_email,omitempty"` Description *string `json:"description,omitempty"` - FacilityId *string `json:"facility_id,omitempty"` // A Metro ID or code. When creating Fabric VCs (Metal Billed), this is where interconnection will be originating from, as we pre-authorize the use of one of our shared ports as the origin of the interconnection using A-Side service tokens. We only allow local connections for Fabric VCs (Metal Billed), so the destination location must be the same as the origin. For Fabric VCs (Fabric Billed), or shared connections, this will be the destination of the interconnection. We allow remote connections for Fabric VCs (Fabric Billed), so the origin of the interconnection can be a different metro set here. Metro string `json:"metro"` Name string `json:"name"` @@ -127,38 +126,6 @@ func (o *VrfFabricVcCreateInput) SetDescription(v string) { o.Description = &v } -// GetFacilityId returns the FacilityId field value if set, zero value otherwise. -func (o *VrfFabricVcCreateInput) GetFacilityId() string { - if o == nil || IsNil(o.FacilityId) { - var ret string - return ret - } - return *o.FacilityId -} - -// GetFacilityIdOk returns a tuple with the FacilityId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *VrfFabricVcCreateInput) GetFacilityIdOk() (*string, bool) { - if o == nil || IsNil(o.FacilityId) { - return nil, false - } - return o.FacilityId, true -} - -// HasFacilityId returns a boolean if a field has been set. -func (o *VrfFabricVcCreateInput) HasFacilityId() bool { - if o != nil && !IsNil(o.FacilityId) { - return true - } - - return false -} - -// SetFacilityId gets a reference to the given string and assigns it to the FacilityId field. -func (o *VrfFabricVcCreateInput) SetFacilityId(v string) { - o.FacilityId = &v -} - // GetMetro returns the Metro field value func (o *VrfFabricVcCreateInput) GetMetro() string { if o == nil { @@ -415,9 +382,6 @@ func (o VrfFabricVcCreateInput) ToMap() (map[string]interface{}, error) { if !IsNil(o.Description) { toSerialize["description"] = o.Description } - if !IsNil(o.FacilityId) { - toSerialize["facility_id"] = o.FacilityId - } toSerialize["metro"] = o.Metro toSerialize["name"] = o.Name if !IsNil(o.Project) { @@ -483,7 +447,6 @@ func (o *VrfFabricVcCreateInput) UnmarshalJSON(data []byte) (err error) { if err = json.Unmarshal(data, &additionalProperties); err == nil { delete(additionalProperties, "contact_email") delete(additionalProperties, "description") - delete(additionalProperties, "facility_id") delete(additionalProperties, "metro") delete(additionalProperties, "name") delete(additionalProperties, "project") diff --git a/services/metalv1/test/api_capacity_test.go b/services/metalv1/test/api_capacity_test.go index aeeefa4e..bc7c536b 100644 --- a/services/metalv1/test/api_capacity_test.go +++ b/services/metalv1/test/api_capacity_test.go @@ -22,16 +22,6 @@ func Test_metalv1_CapacityApiService(t *testing.T) { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - t.Run("Test CapacityApiService CheckCapacityForFacility", func(t *testing.T) { - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.CapacityApi.CheckCapacityForFacility(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - }) - t.Run("Test CapacityApiService CheckCapacityForMetro", func(t *testing.T) { t.Skip("skip test") // remove to run test @@ -62,18 +52,6 @@ func Test_metalv1_CapacityApiService(t *testing.T) { assert.Equal(t, 200, httpRes.StatusCode) }) - t.Run("Test CapacityApiService FindOrganizationCapacityPerFacility", func(t *testing.T) { - t.Skip("skip test") // remove to run test - - var id string - - resp, httpRes, err := apiClient.CapacityApi.FindOrganizationCapacityPerFacility(context.Background(), id).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - }) - t.Run("Test CapacityApiService FindOrganizationCapacityPerMetro", func(t *testing.T) { t.Skip("skip test") // remove to run test diff --git a/services/metalv1/test/api_facilities_test.go b/services/metalv1/test/api_facilities_test.go deleted file mode 100644 index d4a05838..00000000 --- a/services/metalv1/test/api_facilities_test.go +++ /dev/null @@ -1,58 +0,0 @@ -/* -Metal API - -Testing FacilitiesApiService - -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); - -package metalv1 - -import ( - "context" - "testing" - - openapiclient "github.com/equinix/equinix-sdk-go/services/metalv1" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" -) - -func Test_metalv1_FacilitiesApiService(t *testing.T) { - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - - t.Run("Test FacilitiesApiService FindFacilities", func(t *testing.T) { - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.FacilitiesApi.FindFacilities(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - }) - - t.Run("Test FacilitiesApiService FindFacilitiesByOrganization", func(t *testing.T) { - t.Skip("skip test") // remove to run test - - var id string - - resp, httpRes, err := apiClient.FacilitiesApi.FindFacilitiesByOrganization(context.Background(), id).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - }) - - t.Run("Test FacilitiesApiService FindFacilitiesByProject", func(t *testing.T) { - t.Skip("skip test") // remove to run test - - var id string - - resp, httpRes, err := apiClient.FacilitiesApi.FindFacilitiesByProject(context.Background(), id).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - }) -} diff --git a/services/metalv1/test/api_organizations_test.go b/services/metalv1/test/api_organizations_test.go index 56437d8e..e4aa0797 100644 --- a/services/metalv1/test/api_organizations_test.go +++ b/services/metalv1/test/api_organizations_test.go @@ -22,16 +22,6 @@ func Test_metalv1_OrganizationsApiService(t *testing.T) { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - t.Run("Test OrganizationsApiService CreateOrganization", func(t *testing.T) { - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.OrganizationsApi.CreateOrganization(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - }) - t.Run("Test OrganizationsApiService CreateOrganizationInvitation", func(t *testing.T) { t.Skip("skip test") // remove to run test @@ -174,10 +164,6 @@ func Test_metalv1_OrganizationsApiService(t *testing.T) { require.Nil(t, err) require.NotNil(t, resp) assert.Equal(t, 200, httpRes.StatusCode) - - resp, err = apiClient.OrganizationsApi.FindOrganizations(context.Background()).ExecuteWithPagination() - require.Nil(t, err) - require.NotNil(t, resp) }) t.Run("Test OrganizationsApiService FindPlansByOrganization", func(t *testing.T) { @@ -192,6 +178,30 @@ func Test_metalv1_OrganizationsApiService(t *testing.T) { assert.Equal(t, 200, httpRes.StatusCode) }) + t.Run("Test OrganizationsApiService GetOrganizationMembers", func(t *testing.T) { + t.Skip("skip test") // remove to run test + + var organizationId string + + resp, httpRes, err := apiClient.OrganizationsApi.GetOrganizationMembers(context.Background(), organizationId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + }) + + t.Run("Test OrganizationsApiService RemoveOrganizationMember", func(t *testing.T) { + t.Skip("skip test") // remove to run test + + var organizationId string + var id string + + httpRes, err := apiClient.OrganizationsApi.RemoveOrganizationMember(context.Background(), organizationId, id).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + }) + t.Run("Test OrganizationsApiService UpdateOrganization", func(t *testing.T) { t.Skip("skip test") // remove to run test @@ -203,4 +213,17 @@ func Test_metalv1_OrganizationsApiService(t *testing.T) { require.NotNil(t, resp) assert.Equal(t, 200, httpRes.StatusCode) }) + + t.Run("Test OrganizationsApiService UpdateOrganizationMemberRoles", func(t *testing.T) { + t.Skip("skip test") // remove to run test + + var organizationId string + var id string + + resp, httpRes, err := apiClient.OrganizationsApi.UpdateOrganizationMemberRoles(context.Background(), organizationId, id).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + }) } diff --git a/services/metalv1/test/api_roles_test.go b/services/metalv1/test/api_roles_test.go new file mode 100644 index 00000000..d6e4cde7 --- /dev/null +++ b/services/metalv1/test/api_roles_test.go @@ -0,0 +1,49 @@ +/* +Metal API + +Testing RolesApiService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package metalv1 + +import ( + "context" + "testing" + + openapiclient "github.com/equinix/equinix-sdk-go/services/metalv1" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +func Test_metalv1_RolesApiService(t *testing.T) { + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test RolesApiService GetOrganizationRole", func(t *testing.T) { + t.Skip("skip test") // remove to run test + + var id string + var roleId string + + resp, httpRes, err := apiClient.RolesApi.GetOrganizationRole(context.Background(), id, roleId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + }) + + t.Run("Test RolesApiService ListOrganizationRoles", func(t *testing.T) { + t.Skip("skip test") // remove to run test + + var id string + + resp, httpRes, err := apiClient.RolesApi.ListOrganizationRoles(context.Background(), id).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + }) +}