From a913e9eb017bd7a4721bd2ecbcdbb4fbf7ad3f67 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 16 Sep 2024 17:39:10 +0000 Subject: [PATCH 1/3] sync: fetch 2024-09-16 spec and apply patches --- .../components/schemas/DeviceCreateInput.yaml | 10 +-- .../components/schemas/DeviceUpdateInput.yaml | 2 +- .../components/schemas/Organization.yaml | 2 + .../components/schemas/Project.yaml | 2 + .../components/schemas/RecoveryCodeList.yaml | 6 -- .../SelfServiceReservationItemRequest.yaml | 7 ++- .../metalv1/oas3.fetched/openapi3.yaml | 10 --- .../paths/devices/id/traffic.yaml | 5 +- .../metalv1/oas3.fetched/paths/plans.yaml | 2 +- .../paths/user/otp/recovery-codes.yaml | 62 ------------------- .../oas3.fetched/paths/user/otp/sms.yaml | 36 ----------- .../paths/user/otp/sms/receive.yaml | 33 ---------- .../paths/user/otp/verify/otp.yaml | 29 --------- 13 files changed, 19 insertions(+), 187 deletions(-) delete mode 100644 spec/services/metalv1/oas3.fetched/components/schemas/RecoveryCodeList.yaml delete mode 100644 spec/services/metalv1/oas3.fetched/paths/user/otp/recovery-codes.yaml delete mode 100644 spec/services/metalv1/oas3.fetched/paths/user/otp/sms.yaml delete mode 100644 spec/services/metalv1/oas3.fetched/paths/user/otp/sms/receive.yaml delete mode 100644 spec/services/metalv1/oas3.fetched/paths/user/otp/verify/otp.yaml diff --git a/spec/services/metalv1/oas3.fetched/components/schemas/DeviceCreateInput.yaml b/spec/services/metalv1/oas3.fetched/components/schemas/DeviceCreateInput.yaml index 21b64fd0..ed4c776d 100644 --- a/spec/services/metalv1/oas3.fetched/components/schemas/DeviceCreateInput.yaml +++ b/spec/services/metalv1/oas3.fetched/components/schemas/DeviceCreateInput.yaml @@ -51,7 +51,7 @@ properties: description: |- 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://metal.equinix.com/developers/docs/deploy/reserved/) for more details. + See [Reserved Hardware](https://deploy.equinix.com/developers/docs/metal/deploy/reserved/) for more details. example: next-available type: string hostname: @@ -89,9 +89,9 @@ properties: description: |- When set, the device will chainload an iPXE Script at boot fetched from the supplied URL. - See [Custom iPXE](https://metal.equinix.com/developers/docs/operating-systems/custom-ipxe/) for more details. + See [Custom iPXE](https://deploy.equinix.com/developers/docs/metal/operating-systems/custom-ipxe/) for more details. externalDocs: - url: https://metal.equinix.com/developers/docs/operating-systems/custom-ipxe/ + url: https://deploy.equinix.com/developers/docs/metal/operating-systems/custom-ipxe/ type: string locked: default: false @@ -202,10 +202,10 @@ properties: description: |- 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://metal.equinix.com/developers/docs/servers/user-data/) and [Provisioning with Custom iPXE](https://metal.equinix.com/developers/docs/operating-systems/custom-ipxe/#provisioning-with-custom-ipxe) for more details. + 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. type: string externalDocs: - url: https://metal.equinix.com/developers/docs/servers/user-data/ + url: https://deploy.equinix.com/developers/docs/metal/server-metadata/user-data/ required: - plan - operating_system diff --git a/spec/services/metalv1/oas3.fetched/components/schemas/DeviceUpdateInput.yaml b/spec/services/metalv1/oas3.fetched/components/schemas/DeviceUpdateInput.yaml index 933136da..35a8aec1 100644 --- a/spec/services/metalv1/oas3.fetched/components/schemas/DeviceUpdateInput.yaml +++ b/spec/services/metalv1/oas3.fetched/components/schemas/DeviceUpdateInput.yaml @@ -26,7 +26,7 @@ properties: type: boolean description: Can be set to false to convert a spot-market instance to on-demand. externalDocs: - url: https://metal.equinix.com/developers/docs/deploy/spot-market/#converting-a-spot-market-server-to-on-demand + url: https://deploy.equinix.com/developers/docs/metal/deploy/spot-market/#converting-a-spot-market-server-to-on-demand tags: items: type: string diff --git a/spec/services/metalv1/oas3.fetched/components/schemas/Organization.yaml b/spec/services/metalv1/oas3.fetched/components/schemas/Organization.yaml index 534c0b51..6a5e89a2 100644 --- a/spec/services/metalv1/oas3.fetched/components/schemas/Organization.yaml +++ b/spec/services/metalv1/oas3.fetched/components/schemas/Organization.yaml @@ -18,6 +18,8 @@ properties: after that date, unless the value is null format: date-time type: string + href: + type: string id: format: uuid 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 48af7d0b..5d074398 100644 --- a/spec/services/metalv1/oas3.fetched/components/schemas/Project.yaml +++ b/spec/services/metalv1/oas3.fetched/components/schemas/Project.yaml @@ -1,4 +1,6 @@ properties: + backend_transfer_enabled: + type: boolean bgp_config: $ref: './Href.yaml' created_at: diff --git a/spec/services/metalv1/oas3.fetched/components/schemas/RecoveryCodeList.yaml b/spec/services/metalv1/oas3.fetched/components/schemas/RecoveryCodeList.yaml deleted file mode 100644 index 40928232..00000000 --- a/spec/services/metalv1/oas3.fetched/components/schemas/RecoveryCodeList.yaml +++ /dev/null @@ -1,6 +0,0 @@ -properties: - recovery_codes: - items: - type: string - type: array -type: object diff --git a/spec/services/metalv1/oas3.fetched/components/schemas/SelfServiceReservationItemRequest.yaml b/spec/services/metalv1/oas3.fetched/components/schemas/SelfServiceReservationItemRequest.yaml index 12e996eb..65b0acf8 100644 --- a/spec/services/metalv1/oas3.fetched/components/schemas/SelfServiceReservationItemRequest.yaml +++ b/spec/services/metalv1/oas3.fetched/components/schemas/SelfServiceReservationItemRequest.yaml @@ -1,15 +1,16 @@ properties: - amount: - format: float - type: number metro_id: format: uuid type: string + description: Metro ID of the item. plan_id: format: uuid type: string + description: Plan ID of the item. quantity: type: integer + description: Number of items. term: type: string + description: Contract term of the item. type: object diff --git a/spec/services/metalv1/oas3.fetched/openapi3.yaml b/spec/services/metalv1/oas3.fetched/openapi3.yaml index bb464539..27d44abe 100644 --- a/spec/services/metalv1/oas3.fetched/openapi3.yaml +++ b/spec/services/metalv1/oas3.fetched/openapi3.yaml @@ -371,8 +371,6 @@ components: $ref: './components/schemas/ProjectUsage.yaml' ProjectUsageList: $ref: './components/schemas/ProjectUsageList.yaml' - RecoveryCodeList: - $ref: './components/schemas/RecoveryCodeList.yaml' SSHKey: $ref: './components/schemas/SSHKey.yaml' SSHKeyCreateInput: @@ -788,14 +786,6 @@ paths: $ref: ./paths/user/api-keys/id.yaml /user/otp/app: $ref: ./paths/user/otp/app.yaml - /user/otp/recovery-codes: - $ref: ./paths/user/otp/recovery-codes.yaml - /user/otp/sms: - $ref: ./paths/user/otp/sms.yaml - /user/otp/sms/receive: - $ref: ./paths/user/otp/sms/receive.yaml - /user/otp/verify/{otp}: - $ref: ./paths/user/otp/verify/otp.yaml /userdata/validate: $ref: ./paths/userdata/validate.yaml /users: diff --git a/spec/services/metalv1/oas3.fetched/paths/devices/id/traffic.yaml b/spec/services/metalv1/oas3.fetched/paths/devices/id/traffic.yaml index b766b01c..8ac408d1 100644 --- a/spec/services/metalv1/oas3.fetched/paths/devices/id/traffic.yaml +++ b/spec/services/metalv1/oas3.fetched/paths/devices/id/traffic.yaml @@ -1,5 +1,8 @@ get: - description: Returns traffic for a specific device. + description: | + Returns the total amount of inbound or outbound traffic for a specific device. The default time period is 1 hour. + + Please note the results capture all network traffic for the server, but not all traffic may come from or be destined to the Internet and may be non-billable. Only Internet bound traffic is charged. operationId: findTraffic parameters: - description: Device UUID diff --git a/spec/services/metalv1/oas3.fetched/paths/plans.yaml b/spec/services/metalv1/oas3.fetched/paths/plans.yaml index 1f04891e..05764589 100644 --- a/spec/services/metalv1/oas3.fetched/paths/plans.yaml +++ b/spec/services/metalv1/oas3.fetched/paths/plans.yaml @@ -4,7 +4,7 @@ get: parameters: - description: Filter plans by its category in: query - name: categories + name: categories[] schema: type: array items: diff --git a/spec/services/metalv1/oas3.fetched/paths/user/otp/recovery-codes.yaml b/spec/services/metalv1/oas3.fetched/paths/user/otp/recovery-codes.yaml deleted file mode 100644 index b0f88de7..00000000 --- a/spec/services/metalv1/oas3.fetched/paths/user/otp/recovery-codes.yaml +++ /dev/null @@ -1,62 +0,0 @@ -get: - description: Returns my recovery codes. - operationId: findRecoveryCodes - responses: - "200": - content: - application/json: - schema: - $ref: '../../../components/schemas/RecoveryCodeList.yaml' - description: ok - "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: Retrieve my recovery codes - tags: - - OTPs -post: - description: Generate a new set of recovery codes. - operationId: regenerateCodes - responses: - "200": - content: - application/json: - schema: - $ref: '../../../components/schemas/RecoveryCodeList.yaml' - description: ok - "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: Generate new recovery codes - tags: - - OTPs diff --git a/spec/services/metalv1/oas3.fetched/paths/user/otp/sms.yaml b/spec/services/metalv1/oas3.fetched/paths/user/otp/sms.yaml deleted file mode 100644 index d7b17f74..00000000 --- a/spec/services/metalv1/oas3.fetched/paths/user/otp/sms.yaml +++ /dev/null @@ -1,36 +0,0 @@ -delete: - description: Disables two factor authentication. - operationId: disableTfaSms - responses: - "204": - description: no content - "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 - summary: Disable two factor authentication - tags: - - TwoFactorAuth -post: - description: Enables two factor authentication with sms. - operationId: enableTfaSms - responses: - "200": - description: ok - "401": - content: - application/json: - schema: - $ref: '../../../components/schemas/Error.yaml' - description: unauthorized - summary: Enable two factor auth using sms - tags: - - TwoFactorAuth diff --git a/spec/services/metalv1/oas3.fetched/paths/user/otp/sms/receive.yaml b/spec/services/metalv1/oas3.fetched/paths/user/otp/sms/receive.yaml deleted file mode 100644 index c2bea8dc..00000000 --- a/spec/services/metalv1/oas3.fetched/paths/user/otp/sms/receive.yaml +++ /dev/null @@ -1,33 +0,0 @@ -post: - description: Sends an OTP to the user's mobile phone. - operationId: receiveCodes - responses: - "204": - description: no content - "400": - content: - application/json: - schema: - $ref: '../../../../components/schemas/Error.yaml' - description: bad request - "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 - "500": - content: - application/json: - schema: - $ref: '../../../../components/schemas/Error.yaml' - description: internal server error - summary: Receive an OTP per sms - tags: - - OTPs diff --git a/spec/services/metalv1/oas3.fetched/paths/user/otp/verify/otp.yaml b/spec/services/metalv1/oas3.fetched/paths/user/otp/verify/otp.yaml deleted file mode 100644 index 750dc153..00000000 --- a/spec/services/metalv1/oas3.fetched/paths/user/otp/verify/otp.yaml +++ /dev/null @@ -1,29 +0,0 @@ -post: - description: It verifies the user once a valid OTP is provided. It gives back a - session token, essentially logging in the user. - operationId: findEnsureOtp - parameters: - - description: OTP - in: path - name: otp - required: true - schema: - type: string - responses: - "204": - description: no content - "400": - content: - application/json: - schema: - $ref: '../../../../components/schemas/Error.yaml' - description: bad request - "401": - content: - application/json: - schema: - $ref: '../../../../components/schemas/Error.yaml' - description: unauthorized - summary: Verify user by providing an OTP - tags: - - OTPs From 20a63ab210049a67ec93c2acb95868f32d389a59 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 16 Sep 2024 17:39:10 +0000 Subject: [PATCH 2/3] sync: patch spec with 2024-09-16 spec --- .../components/schemas/DeviceCreateInput.yaml | 10 +-- .../components/schemas/DeviceUpdateInput.yaml | 2 +- .../components/schemas/Organization.yaml | 2 + .../components/schemas/Project.yaml | 2 + .../components/schemas/RecoveryCodeList.yaml | 6 -- .../SelfServiceReservationItemRequest.yaml | 7 ++- .../metalv1/oas3.patched/openapi3.yaml | 12 ---- .../metalv1/oas3.patched/openapi3.yaml.rej | 11 ++++ .../paths/devices/id/traffic.yaml | 5 +- .../metalv1/oas3.patched/paths/plans.yaml | 2 +- .../paths/user/otp/recovery-codes.yaml | 62 ------------------- .../oas3.patched/paths/user/otp/sms.yaml | 40 ------------ .../paths/user/otp/sms/receive.yaml | 33 ---------- .../paths/user/otp/verify/otp.yaml | 29 --------- 14 files changed, 30 insertions(+), 193 deletions(-) delete mode 100644 spec/services/metalv1/oas3.patched/components/schemas/RecoveryCodeList.yaml create mode 100644 spec/services/metalv1/oas3.patched/openapi3.yaml.rej delete mode 100644 spec/services/metalv1/oas3.patched/paths/user/otp/recovery-codes.yaml delete mode 100644 spec/services/metalv1/oas3.patched/paths/user/otp/sms.yaml delete mode 100644 spec/services/metalv1/oas3.patched/paths/user/otp/sms/receive.yaml delete mode 100644 spec/services/metalv1/oas3.patched/paths/user/otp/verify/otp.yaml diff --git a/spec/services/metalv1/oas3.patched/components/schemas/DeviceCreateInput.yaml b/spec/services/metalv1/oas3.patched/components/schemas/DeviceCreateInput.yaml index 21b64fd0..ed4c776d 100644 --- a/spec/services/metalv1/oas3.patched/components/schemas/DeviceCreateInput.yaml +++ b/spec/services/metalv1/oas3.patched/components/schemas/DeviceCreateInput.yaml @@ -51,7 +51,7 @@ properties: description: |- 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://metal.equinix.com/developers/docs/deploy/reserved/) for more details. + See [Reserved Hardware](https://deploy.equinix.com/developers/docs/metal/deploy/reserved/) for more details. example: next-available type: string hostname: @@ -89,9 +89,9 @@ properties: description: |- When set, the device will chainload an iPXE Script at boot fetched from the supplied URL. - See [Custom iPXE](https://metal.equinix.com/developers/docs/operating-systems/custom-ipxe/) for more details. + See [Custom iPXE](https://deploy.equinix.com/developers/docs/metal/operating-systems/custom-ipxe/) for more details. externalDocs: - url: https://metal.equinix.com/developers/docs/operating-systems/custom-ipxe/ + url: https://deploy.equinix.com/developers/docs/metal/operating-systems/custom-ipxe/ type: string locked: default: false @@ -202,10 +202,10 @@ properties: description: |- 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://metal.equinix.com/developers/docs/servers/user-data/) and [Provisioning with Custom iPXE](https://metal.equinix.com/developers/docs/operating-systems/custom-ipxe/#provisioning-with-custom-ipxe) for more details. + 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. type: string externalDocs: - url: https://metal.equinix.com/developers/docs/servers/user-data/ + url: https://deploy.equinix.com/developers/docs/metal/server-metadata/user-data/ required: - plan - operating_system diff --git a/spec/services/metalv1/oas3.patched/components/schemas/DeviceUpdateInput.yaml b/spec/services/metalv1/oas3.patched/components/schemas/DeviceUpdateInput.yaml index 933136da..35a8aec1 100644 --- a/spec/services/metalv1/oas3.patched/components/schemas/DeviceUpdateInput.yaml +++ b/spec/services/metalv1/oas3.patched/components/schemas/DeviceUpdateInput.yaml @@ -26,7 +26,7 @@ properties: type: boolean description: Can be set to false to convert a spot-market instance to on-demand. externalDocs: - url: https://metal.equinix.com/developers/docs/deploy/spot-market/#converting-a-spot-market-server-to-on-demand + url: https://deploy.equinix.com/developers/docs/metal/deploy/spot-market/#converting-a-spot-market-server-to-on-demand tags: items: type: string diff --git a/spec/services/metalv1/oas3.patched/components/schemas/Organization.yaml b/spec/services/metalv1/oas3.patched/components/schemas/Organization.yaml index 534c0b51..6a5e89a2 100644 --- a/spec/services/metalv1/oas3.patched/components/schemas/Organization.yaml +++ b/spec/services/metalv1/oas3.patched/components/schemas/Organization.yaml @@ -18,6 +18,8 @@ properties: after that date, unless the value is null format: date-time type: string + href: + type: string id: format: uuid 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 48af7d0b..5d074398 100644 --- a/spec/services/metalv1/oas3.patched/components/schemas/Project.yaml +++ b/spec/services/metalv1/oas3.patched/components/schemas/Project.yaml @@ -1,4 +1,6 @@ properties: + backend_transfer_enabled: + type: boolean bgp_config: $ref: './Href.yaml' created_at: diff --git a/spec/services/metalv1/oas3.patched/components/schemas/RecoveryCodeList.yaml b/spec/services/metalv1/oas3.patched/components/schemas/RecoveryCodeList.yaml deleted file mode 100644 index 40928232..00000000 --- a/spec/services/metalv1/oas3.patched/components/schemas/RecoveryCodeList.yaml +++ /dev/null @@ -1,6 +0,0 @@ -properties: - recovery_codes: - items: - type: string - type: array -type: object diff --git a/spec/services/metalv1/oas3.patched/components/schemas/SelfServiceReservationItemRequest.yaml b/spec/services/metalv1/oas3.patched/components/schemas/SelfServiceReservationItemRequest.yaml index 12e996eb..65b0acf8 100644 --- a/spec/services/metalv1/oas3.patched/components/schemas/SelfServiceReservationItemRequest.yaml +++ b/spec/services/metalv1/oas3.patched/components/schemas/SelfServiceReservationItemRequest.yaml @@ -1,15 +1,16 @@ properties: - amount: - format: float - type: number metro_id: format: uuid type: string + description: Metro ID of the item. plan_id: format: uuid type: string + description: Plan ID of the item. quantity: type: integer + description: Number of items. term: type: string + description: Contract term of the item. type: object diff --git a/spec/services/metalv1/oas3.patched/openapi3.yaml b/spec/services/metalv1/oas3.patched/openapi3.yaml index 017d4ee6..27d44abe 100644 --- a/spec/services/metalv1/oas3.patched/openapi3.yaml +++ b/spec/services/metalv1/oas3.patched/openapi3.yaml @@ -371,8 +371,6 @@ components: $ref: './components/schemas/ProjectUsage.yaml' ProjectUsageList: $ref: './components/schemas/ProjectUsageList.yaml' - RecoveryCodeList: - $ref: './components/schemas/RecoveryCodeList.yaml' SSHKey: $ref: './components/schemas/SSHKey.yaml' SSHKeyCreateInput: @@ -788,16 +786,6 @@ paths: $ref: ./paths/user/api-keys/id.yaml /user/otp/app: $ref: ./paths/user/otp/app.yaml - /user/otp/app/receive: - $ref: ./paths/user/otp/app/receive.yaml - /user/otp/recovery-codes: - $ref: ./paths/user/otp/recovery-codes.yaml - /user/otp/sms: - $ref: ./paths/user/otp/sms.yaml - /user/otp/sms/receive: - $ref: ./paths/user/otp/sms/receive.yaml - /user/otp/verify/{otp}: - $ref: ./paths/user/otp/verify/otp.yaml /userdata/validate: $ref: ./paths/userdata/validate.yaml /users: diff --git a/spec/services/metalv1/oas3.patched/openapi3.yaml.rej b/spec/services/metalv1/oas3.patched/openapi3.yaml.rej new file mode 100644 index 00000000..47eb1c76 --- /dev/null +++ b/spec/services/metalv1/oas3.patched/openapi3.yaml.rej @@ -0,0 +1,11 @@ +--- spec/services/metalv1/oas3.patched/openapi3.yaml ++++ spec/services/metalv1/oas3.patched/openapi3.yaml +@@ -776,6 +776,8 @@ paths: + $ref: ./paths/user/api-keys/id.yaml + /user/otp/app: + $ref: ./paths/user/otp/app.yaml ++ /user/otp/app/receive: ++ $ref: ./paths/user/otp/app/receive.yaml + /user/otp/recovery-codes: + $ref: ./paths/user/otp/recovery-codes.yaml + /user/otp/sms: diff --git a/spec/services/metalv1/oas3.patched/paths/devices/id/traffic.yaml b/spec/services/metalv1/oas3.patched/paths/devices/id/traffic.yaml index b766b01c..8ac408d1 100644 --- a/spec/services/metalv1/oas3.patched/paths/devices/id/traffic.yaml +++ b/spec/services/metalv1/oas3.patched/paths/devices/id/traffic.yaml @@ -1,5 +1,8 @@ get: - description: Returns traffic for a specific device. + description: | + Returns the total amount of inbound or outbound traffic for a specific device. The default time period is 1 hour. + + Please note the results capture all network traffic for the server, but not all traffic may come from or be destined to the Internet and may be non-billable. Only Internet bound traffic is charged. operationId: findTraffic parameters: - description: Device UUID diff --git a/spec/services/metalv1/oas3.patched/paths/plans.yaml b/spec/services/metalv1/oas3.patched/paths/plans.yaml index 1f04891e..05764589 100644 --- a/spec/services/metalv1/oas3.patched/paths/plans.yaml +++ b/spec/services/metalv1/oas3.patched/paths/plans.yaml @@ -4,7 +4,7 @@ get: parameters: - description: Filter plans by its category in: query - name: categories + name: categories[] schema: type: array items: diff --git a/spec/services/metalv1/oas3.patched/paths/user/otp/recovery-codes.yaml b/spec/services/metalv1/oas3.patched/paths/user/otp/recovery-codes.yaml deleted file mode 100644 index b0f88de7..00000000 --- a/spec/services/metalv1/oas3.patched/paths/user/otp/recovery-codes.yaml +++ /dev/null @@ -1,62 +0,0 @@ -get: - description: Returns my recovery codes. - operationId: findRecoveryCodes - responses: - "200": - content: - application/json: - schema: - $ref: '../../../components/schemas/RecoveryCodeList.yaml' - description: ok - "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: Retrieve my recovery codes - tags: - - OTPs -post: - description: Generate a new set of recovery codes. - operationId: regenerateCodes - responses: - "200": - content: - application/json: - schema: - $ref: '../../../components/schemas/RecoveryCodeList.yaml' - description: ok - "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: Generate new recovery codes - tags: - - OTPs diff --git a/spec/services/metalv1/oas3.patched/paths/user/otp/sms.yaml b/spec/services/metalv1/oas3.patched/paths/user/otp/sms.yaml deleted file mode 100644 index 496105e2..00000000 --- a/spec/services/metalv1/oas3.patched/paths/user/otp/sms.yaml +++ /dev/null @@ -1,40 +0,0 @@ -delete: - description: Disables two factor authentication. - operationId: disableTfaSms - parameters: - - $ref: '../../../components/parameters/XOtpToken.yaml' - responses: - "204": - description: no content - "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 - summary: Disable two factor authentication - tags: - - TwoFactorAuth -post: - description: Enables two factor authentication with sms. - operationId: enableTfaSms - parameters: - - $ref: '../../../components/parameters/XOtpToken.yaml' - responses: - "200": - description: ok - "401": - content: - application/json: - schema: - $ref: '../../../components/schemas/Error.yaml' - description: unauthorized - summary: Enable two factor auth using sms - tags: - - TwoFactorAuth diff --git a/spec/services/metalv1/oas3.patched/paths/user/otp/sms/receive.yaml b/spec/services/metalv1/oas3.patched/paths/user/otp/sms/receive.yaml deleted file mode 100644 index c2bea8dc..00000000 --- a/spec/services/metalv1/oas3.patched/paths/user/otp/sms/receive.yaml +++ /dev/null @@ -1,33 +0,0 @@ -post: - description: Sends an OTP to the user's mobile phone. - operationId: receiveCodes - responses: - "204": - description: no content - "400": - content: - application/json: - schema: - $ref: '../../../../components/schemas/Error.yaml' - description: bad request - "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 - "500": - content: - application/json: - schema: - $ref: '../../../../components/schemas/Error.yaml' - description: internal server error - summary: Receive an OTP per sms - tags: - - OTPs diff --git a/spec/services/metalv1/oas3.patched/paths/user/otp/verify/otp.yaml b/spec/services/metalv1/oas3.patched/paths/user/otp/verify/otp.yaml deleted file mode 100644 index 750dc153..00000000 --- a/spec/services/metalv1/oas3.patched/paths/user/otp/verify/otp.yaml +++ /dev/null @@ -1,29 +0,0 @@ -post: - description: It verifies the user once a valid OTP is provided. It gives back a - session token, essentially logging in the user. - operationId: findEnsureOtp - parameters: - - description: OTP - in: path - name: otp - required: true - schema: - type: string - responses: - "204": - description: no content - "400": - content: - application/json: - schema: - $ref: '../../../../components/schemas/Error.yaml' - description: bad request - "401": - content: - application/json: - schema: - $ref: '../../../../components/schemas/Error.yaml' - description: unauthorized - summary: Verify user by providing an OTP - tags: - - OTPs From 5fcd0c15e7c9d4241ac6d9886fc4a9226360e226 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 16 Sep 2024 17:39:57 +0000 Subject: [PATCH 3/3] sync: generate client with 2024-09-16 spec --- services/metalv1/README.md | 9 - services/metalv1/api_devices.go | 4 +- services/metalv1/api_otps.go | 742 ------------------ services/metalv1/api_plans.go | 2 +- services/metalv1/api_two_factor_auth.go | 255 ------ services/metalv1/client.go | 3 - services/metalv1/docs/AuthTokenProject.md | 26 + services/metalv1/docs/CreateDeviceRequest.md | 6 +- .../docs/DeviceCreateInFacilityInput.md | 6 +- .../metalv1/docs/DeviceCreateInMetroInput.md | 6 +- services/metalv1/docs/DeviceCreateInput.md | 6 +- .../InstancesBatchCreateInputBatchesInner.md | 6 +- services/metalv1/docs/OTPsApi.md | 323 -------- services/metalv1/docs/Organization.md | 26 + services/metalv1/docs/OtpSeed.md | 56 -- services/metalv1/docs/Project.md | 26 + services/metalv1/docs/RecoveryCodeList.md | 56 -- .../docs/SelfServiceReservationItemRequest.md | 34 +- services/metalv1/docs/TwoFactorAuthApi.md | 130 --- services/metalv1/model_auth_token_project.go | 57 +- .../model_device_create_in_facility_input.go | 6 +- .../model_device_create_in_metro_input.go | 6 +- services/metalv1/model_device_create_input.go | 6 +- ...tances_batch_create_input_batches_inner.go | 6 +- services/metalv1/model_organization.go | 37 + services/metalv1/model_otp_seed.go | 152 ---- services/metalv1/model_project.go | 57 +- services/metalv1/model_recovery_code_list.go | 151 ---- ...l_self_service_reservation_item_request.go | 49 +- services/metalv1/test/api_otps_test.go | 74 -- .../metalv1/test/api_two_factor_auth_test.go | 18 - 31 files changed, 252 insertions(+), 2089 deletions(-) delete mode 100644 services/metalv1/api_otps.go delete mode 100644 services/metalv1/docs/OTPsApi.md delete mode 100644 services/metalv1/docs/OtpSeed.md delete mode 100644 services/metalv1/docs/RecoveryCodeList.md delete mode 100644 services/metalv1/model_otp_seed.go delete mode 100644 services/metalv1/model_recovery_code_list.go delete mode 100644 services/metalv1/test/api_otps_test.go diff --git a/services/metalv1/README.md b/services/metalv1/README.md index 503463d0..60bf4385 100644 --- a/services/metalv1/README.md +++ b/services/metalv1/README.md @@ -273,11 +273,6 @@ Class | Method | HTTP request | Description *MetalGatewaysApi* | [**GetMetalGatewayElasticIps**](docs/MetalGatewaysApi.md#getmetalgatewayelasticips) | **Get** /metal-gateways/{id}/ips | List Metal Gateway Elastic IPs *MetrosApi* | [**FindMetros**](docs/MetrosApi.md#findmetros) | **Get** /locations/metros | Retrieve all metros *MetrosApi* | [**GetMetro**](docs/MetrosApi.md#getmetro) | **Get** /locations/metros/{id} | Retrieve a specific Metro's details -*OTPsApi* | [**FindEnsureOtp**](docs/OTPsApi.md#findensureotp) | **Post** /user/otp/verify/{otp} | Verify user by providing an OTP -*OTPsApi* | [**FindRecoveryCodes**](docs/OTPsApi.md#findrecoverycodes) | **Get** /user/otp/recovery-codes | Retrieve my recovery codes -*OTPsApi* | [**ReceiveCodes**](docs/OTPsApi.md#receivecodes) | **Post** /user/otp/sms/receive | Receive an OTP per sms -*OTPsApi* | [**RegenerateCodes**](docs/OTPsApi.md#regeneratecodes) | **Post** /user/otp/recovery-codes | Generate new recovery codes -*OTPsApi* | [**SeedApp**](docs/OTPsApi.md#seedapp) | **Post** /user/otp/app/receive | Issue OTP seeds *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 @@ -350,9 +345,7 @@ Class | Method | HTTP request | Description *TransferRequestsApi* | [**DeclineTransferRequest**](docs/TransferRequestsApi.md#declinetransferrequest) | **Delete** /transfers/{id} | Decline a transfer request *TransferRequestsApi* | [**FindTransferRequestById**](docs/TransferRequestsApi.md#findtransferrequestbyid) | **Get** /transfers/{id} | View a transfer request *TwoFactorAuthApi* | [**DisableTfaApp**](docs/TwoFactorAuthApi.md#disabletfaapp) | **Delete** /user/otp/app | Disable two factor authentication -*TwoFactorAuthApi* | [**DisableTfaSms**](docs/TwoFactorAuthApi.md#disabletfasms) | **Delete** /user/otp/sms | Disable two factor authentication *TwoFactorAuthApi* | [**EnableTfaApp**](docs/TwoFactorAuthApi.md#enabletfaapp) | **Post** /user/otp/app | Enable two factor auth using app -*TwoFactorAuthApi* | [**EnableTfaSms**](docs/TwoFactorAuthApi.md#enabletfasms) | **Post** /user/otp/sms | Enable two factor auth using sms *UsagesApi* | [**FindDeviceUsages**](docs/UsagesApi.md#finddeviceusages) | **Get** /devices/{id}/usages | Retrieve all usages for device *UsagesApi* | [**FindProjectUsage**](docs/UsagesApi.md#findprojectusage) | **Get** /projects/{id}/usages | Retrieve all usages for project *UserVerificationTokensApi* | [**ConsumeVerificationRequest**](docs/UserVerificationTokensApi.md#consumeverificationrequest) | **Put** /verify-email | Verify a user using an email verification token @@ -571,7 +564,6 @@ Class | Method | HTTP request | Description - [Organization](docs/Organization.md) - [OrganizationInput](docs/OrganizationInput.md) - [OrganizationList](docs/OrganizationList.md) - - [OtpSeed](docs/OtpSeed.md) - [ParentBlock](docs/ParentBlock.md) - [Partition](docs/Partition.md) - [PaymentMethod](docs/PaymentMethod.md) @@ -621,7 +613,6 @@ Class | Method | HTTP request | Description - [ProjectUsage](docs/ProjectUsage.md) - [ProjectUsageList](docs/ProjectUsageList.md) - [Raid](docs/Raid.md) - - [RecoveryCodeList](docs/RecoveryCodeList.md) - [RequestIPReservation201Response](docs/RequestIPReservation201Response.md) - [RequestIPReservationRequest](docs/RequestIPReservationRequest.md) - [SSHKey](docs/SSHKey.md) diff --git a/services/metalv1/api_devices.go b/services/metalv1/api_devices.go index d806c2a6..5808ba24 100644 --- a/services/metalv1/api_devices.go +++ b/services/metalv1/api_devices.go @@ -2597,7 +2597,9 @@ func (r ApiFindTrafficRequest) Execute() (*http.Response, error) { /* FindTraffic Retrieve device traffic -Returns traffic for a specific device. +Returns the total amount of inbound or outbound traffic for a specific device. The default time period is 1 hour. + +Please note the results capture all network traffic for the server, but not all traffic may come from or be destined to the Internet and may be non-billable. Only Internet bound traffic is charged. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param id Device UUID diff --git a/services/metalv1/api_otps.go b/services/metalv1/api_otps.go deleted file mode 100644 index 70287b0e..00000000 --- a/services/metalv1/api_otps.go +++ /dev/null @@ -1,742 +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" -) - -// OTPsApiService OTPsApi service -type OTPsApiService service - -type ApiFindEnsureOtpRequest struct { - ctx context.Context - ApiService *OTPsApiService - otp string -} - -func (r ApiFindEnsureOtpRequest) Execute() (*http.Response, error) { - return r.ApiService.FindEnsureOtpExecute(r) -} - -/* -FindEnsureOtp Verify user by providing an OTP - -It verifies the user once a valid OTP is provided. It gives back a session token, essentially logging in the user. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param otp OTP - @return ApiFindEnsureOtpRequest -*/ -func (a *OTPsApiService) FindEnsureOtp(ctx context.Context, otp string) ApiFindEnsureOtpRequest { - return ApiFindEnsureOtpRequest{ - ApiService: a, - ctx: ctx, - otp: otp, - } -} - -// Execute executes the request -func (a *OTPsApiService) FindEnsureOtpExecute(r ApiFindEnsureOtpRequest) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OTPsApiService.FindEnsureOtp") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/user/otp/verify/{otp}" - localVarPath = strings.Replace(localVarPath, "{"+"otp"+"}", url.PathEscape(parameterValueToString(r.otp, "otp")), -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 == 400 { - 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 == 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 - } - - return localVarHTTPResponse, nil -} - -type ApiFindRecoveryCodesRequest struct { - ctx context.Context - ApiService *OTPsApiService -} - -func (r ApiFindRecoveryCodesRequest) Execute() (*RecoveryCodeList, *http.Response, error) { - return r.ApiService.FindRecoveryCodesExecute(r) -} - -/* -FindRecoveryCodes Retrieve my recovery codes - -Returns my recovery codes. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiFindRecoveryCodesRequest -*/ -func (a *OTPsApiService) FindRecoveryCodes(ctx context.Context) ApiFindRecoveryCodesRequest { - return ApiFindRecoveryCodesRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// -// @return RecoveryCodeList -func (a *OTPsApiService) FindRecoveryCodesExecute(r ApiFindRecoveryCodesRequest) (*RecoveryCodeList, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *RecoveryCodeList - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OTPsApiService.FindRecoveryCodes") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/user/otp/recovery-codes" - - 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 == 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 ApiReceiveCodesRequest struct { - ctx context.Context - ApiService *OTPsApiService -} - -func (r ApiReceiveCodesRequest) Execute() (*http.Response, error) { - return r.ApiService.ReceiveCodesExecute(r) -} - -/* -ReceiveCodes Receive an OTP per sms - -Sends an OTP to the user's mobile phone. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiReceiveCodesRequest -*/ -func (a *OTPsApiService) ReceiveCodes(ctx context.Context) ApiReceiveCodesRequest { - return ApiReceiveCodesRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -func (a *OTPsApiService) ReceiveCodesExecute(r ApiReceiveCodesRequest) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OTPsApiService.ReceiveCodes") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/user/otp/sms/receive" - - 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 == 400 { - 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 == 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 == 422 { - 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 == 500 { - 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 ApiRegenerateCodesRequest struct { - ctx context.Context - ApiService *OTPsApiService -} - -func (r ApiRegenerateCodesRequest) Execute() (*RecoveryCodeList, *http.Response, error) { - return r.ApiService.RegenerateCodesExecute(r) -} - -/* -RegenerateCodes Generate new recovery codes - -Generate a new set of recovery codes. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiRegenerateCodesRequest -*/ -func (a *OTPsApiService) RegenerateCodes(ctx context.Context) ApiRegenerateCodesRequest { - return ApiRegenerateCodesRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// -// @return RecoveryCodeList -func (a *OTPsApiService) RegenerateCodesExecute(r ApiRegenerateCodesRequest) (*RecoveryCodeList, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *RecoveryCodeList - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OTPsApiService.RegenerateCodes") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/user/otp/recovery-codes" - - 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 == 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 ApiSeedAppRequest struct { - ctx context.Context - ApiService *OTPsApiService -} - -func (r ApiSeedAppRequest) Execute() (*OtpSeed, *http.Response, error) { - return r.ApiService.SeedAppExecute(r) -} - -/* -SeedApp Issue OTP seeds - -Issues OTP seeds for the user to upload to their 2FA app - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiSeedAppRequest -*/ -func (a *OTPsApiService) SeedApp(ctx context.Context) ApiSeedAppRequest { - return ApiSeedAppRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// -// @return OtpSeed -func (a *OTPsApiService) SeedAppExecute(r ApiSeedAppRequest) (*OtpSeed, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *OtpSeed - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OTPsApiService.SeedApp") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/user/otp/app/receive" - - 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 == 400 { - 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 == 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 - } - if localVarHTTPResponse.StatusCode == 500 { - 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_plans.go b/services/metalv1/api_plans.go index e600e65a..7f90e7dc 100644 --- a/services/metalv1/api_plans.go +++ b/services/metalv1/api_plans.go @@ -102,7 +102,7 @@ func (a *PlansApiService) FindPlansExecute(r ApiFindPlansRequest) (*PlanList, *h localVarFormParams := url.Values{} if r.categories != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "categories", r.categories, "csv") + parameterAddToHeaderOrQuery(localVarQueryParams, "categories[]", r.categories, "csv") } if r.type_ != nil { parameterAddToHeaderOrQuery(localVarQueryParams, "type", r.type_, "") diff --git a/services/metalv1/api_two_factor_auth.go b/services/metalv1/api_two_factor_auth.go index 45eced50..5d204084 100644 --- a/services/metalv1/api_two_factor_auth.go +++ b/services/metalv1/api_two_factor_auth.go @@ -152,139 +152,6 @@ func (a *TwoFactorAuthApiService) DisableTfaAppExecute(r ApiDisableTfaAppRequest return localVarHTTPResponse, nil } -type ApiDisableTfaSmsRequest struct { - ctx context.Context - ApiService *TwoFactorAuthApiService - xOtpToken *string -} - -func (r ApiDisableTfaSmsRequest) XOtpToken(xOtpToken string) ApiDisableTfaSmsRequest { - r.xOtpToken = &xOtpToken - return r -} - -func (r ApiDisableTfaSmsRequest) Execute() (*http.Response, error) { - return r.ApiService.DisableTfaSmsExecute(r) -} - -/* -DisableTfaSms Disable two factor authentication - -Disables two factor authentication. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiDisableTfaSmsRequest -*/ -func (a *TwoFactorAuthApiService) DisableTfaSms(ctx context.Context) ApiDisableTfaSmsRequest { - return ApiDisableTfaSmsRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -func (a *TwoFactorAuthApiService) DisableTfaSmsExecute(r ApiDisableTfaSmsRequest) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TwoFactorAuthApiService.DisableTfaSms") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/user/otp/sms" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.xOtpToken == nil { - return nil, reportError("xOtpToken is required and must be specified") - } - - // 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 - } - parameterAddToHeaderOrQuery(localVarHeaderParams, "x-otp-token", r.xOtpToken, "") - 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 == 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 ApiEnableTfaAppRequest struct { ctx context.Context ApiService *TwoFactorAuthApiService @@ -406,125 +273,3 @@ func (a *TwoFactorAuthApiService) EnableTfaAppExecute(r ApiEnableTfaAppRequest) return localVarHTTPResponse, nil } - -type ApiEnableTfaSmsRequest struct { - ctx context.Context - ApiService *TwoFactorAuthApiService - xOtpToken *string -} - -func (r ApiEnableTfaSmsRequest) XOtpToken(xOtpToken string) ApiEnableTfaSmsRequest { - r.xOtpToken = &xOtpToken - return r -} - -func (r ApiEnableTfaSmsRequest) Execute() (*http.Response, error) { - return r.ApiService.EnableTfaSmsExecute(r) -} - -/* -EnableTfaSms Enable two factor auth using sms - -Enables two factor authentication with sms. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiEnableTfaSmsRequest -*/ -func (a *TwoFactorAuthApiService) EnableTfaSms(ctx context.Context) ApiEnableTfaSmsRequest { - return ApiEnableTfaSmsRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -func (a *TwoFactorAuthApiService) EnableTfaSmsExecute(r ApiEnableTfaSmsRequest) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TwoFactorAuthApiService.EnableTfaSms") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/user/otp/sms" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.xOtpToken == nil { - return nil, reportError("xOtpToken is required and must be specified") - } - - // 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 - } - parameterAddToHeaderOrQuery(localVarHeaderParams, "x-otp-token", r.xOtpToken, "") - 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 - } - - return localVarHTTPResponse, nil -} diff --git a/services/metalv1/client.go b/services/metalv1/client.go index f028ed6c..e53678b9 100644 --- a/services/metalv1/client.go +++ b/services/metalv1/client.go @@ -86,8 +86,6 @@ type APIClient struct { MetrosApi *MetrosApiService - OTPsApi *OTPsApiService - OperatingSystemsApi *OperatingSystemsApiService OrganizationsApi *OrganizationsApiService @@ -163,7 +161,6 @@ func NewAPIClient(cfg *Configuration) *APIClient { c.MembershipsApi = (*MembershipsApiService)(&c.common) c.MetalGatewaysApi = (*MetalGatewaysApiService)(&c.common) c.MetrosApi = (*MetrosApiService)(&c.common) - c.OTPsApi = (*OTPsApiService)(&c.common) c.OperatingSystemsApi = (*OperatingSystemsApiService)(&c.common) c.OrganizationsApi = (*OrganizationsApiService)(&c.common) c.PasswordResetTokensApi = (*PasswordResetTokensApiService)(&c.common) diff --git a/services/metalv1/docs/AuthTokenProject.md b/services/metalv1/docs/AuthTokenProject.md index f2e84739..eab62ea2 100644 --- a/services/metalv1/docs/AuthTokenProject.md +++ b/services/metalv1/docs/AuthTokenProject.md @@ -4,6 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**BackendTransferEnabled** | Pointer to **bool** | | [optional] **BgpConfig** | Pointer to [**Href**](Href.md) | | [optional] **CreatedAt** | Pointer to **time.Time** | | [optional] **Customdata** | Pointer to **map[string]interface{}** | | [optional] @@ -44,6 +45,31 @@ NewAuthTokenProjectWithDefaults instantiates a new AuthTokenProject 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 +### GetBackendTransferEnabled + +`func (o *AuthTokenProject) GetBackendTransferEnabled() bool` + +GetBackendTransferEnabled returns the BackendTransferEnabled field if non-nil, zero value otherwise. + +### GetBackendTransferEnabledOk + +`func (o *AuthTokenProject) GetBackendTransferEnabledOk() (*bool, bool)` + +GetBackendTransferEnabledOk returns a tuple with the BackendTransferEnabled field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBackendTransferEnabled + +`func (o *AuthTokenProject) SetBackendTransferEnabled(v bool)` + +SetBackendTransferEnabled sets BackendTransferEnabled field to given value. + +### HasBackendTransferEnabled + +`func (o *AuthTokenProject) HasBackendTransferEnabled() bool` + +HasBackendTransferEnabled returns a boolean if a field has been set. + ### GetBgpConfig `func (o *AuthTokenProject) GetBgpConfig() Href` diff --git a/services/metalv1/docs/CreateDeviceRequest.md b/services/metalv1/docs/CreateDeviceRequest.md index 9a000a83..eb995603 100644 --- a/services/metalv1/docs/CreateDeviceRequest.md +++ b/services/metalv1/docs/CreateDeviceRequest.md @@ -10,10 +10,10 @@ Name | Type | Description | Notes **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://metal.equinix.com/developers/docs/deploy/reserved/) for more details. | [optional] [default to ""] +**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://metal.equinix.com/developers/docs/operating-systems/custom-ipxe/) for more details. | [optional] +**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] @@ -29,7 +29,7 @@ Name | Type | Description | Notes **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://metal.equinix.com/developers/docs/servers/user-data/) and [Provisioning with Custom iPXE](https://metal.equinix.com/developers/docs/operating-systems/custom-ipxe/#provisioning-with-custom-ipxe) for more details. | [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 diff --git a/services/metalv1/docs/DeviceCreateInFacilityInput.md b/services/metalv1/docs/DeviceCreateInFacilityInput.md index 91fc57e9..61096578 100644 --- a/services/metalv1/docs/DeviceCreateInFacilityInput.md +++ b/services/metalv1/docs/DeviceCreateInFacilityInput.md @@ -10,10 +10,10 @@ Name | Type | Description | Notes **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://metal.equinix.com/developers/docs/deploy/reserved/) for more details. | [optional] [default to ""] +**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://metal.equinix.com/developers/docs/operating-systems/custom-ipxe/) for more details. | [optional] +**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] @@ -29,7 +29,7 @@ Name | Type | Description | Notes **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://metal.equinix.com/developers/docs/servers/user-data/) and [Provisioning with Custom iPXE](https://metal.equinix.com/developers/docs/operating-systems/custom-ipxe/#provisioning-with-custom-ipxe) for more details. | [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] ## Methods diff --git a/services/metalv1/docs/DeviceCreateInMetroInput.md b/services/metalv1/docs/DeviceCreateInMetroInput.md index 153c2498..174677a2 100644 --- a/services/metalv1/docs/DeviceCreateInMetroInput.md +++ b/services/metalv1/docs/DeviceCreateInMetroInput.md @@ -10,10 +10,10 @@ Name | Type | Description | Notes **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://metal.equinix.com/developers/docs/deploy/reserved/) for more details. | [optional] [default to ""] +**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://metal.equinix.com/developers/docs/operating-systems/custom-ipxe/) for more details. | [optional] +**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] @@ -29,7 +29,7 @@ Name | Type | Description | Notes **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://metal.equinix.com/developers/docs/servers/user-data/) and [Provisioning with Custom iPXE](https://metal.equinix.com/developers/docs/operating-systems/custom-ipxe/#provisioning-with-custom-ipxe) for more details. | [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] ## Methods diff --git a/services/metalv1/docs/DeviceCreateInput.md b/services/metalv1/docs/DeviceCreateInput.md index 9c5255b9..ee53d8d7 100644 --- a/services/metalv1/docs/DeviceCreateInput.md +++ b/services/metalv1/docs/DeviceCreateInput.md @@ -9,10 +9,10 @@ Name | Type | Description | Notes **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://metal.equinix.com/developers/docs/deploy/reserved/) for more details. | [optional] [default to ""] +**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://metal.equinix.com/developers/docs/operating-systems/custom-ipxe/) for more details. | [optional] +**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] @@ -28,7 +28,7 @@ Name | Type | Description | Notes **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://metal.equinix.com/developers/docs/servers/user-data/) and [Provisioning with Custom iPXE](https://metal.equinix.com/developers/docs/operating-systems/custom-ipxe/#provisioning-with-custom-ipxe) for more details. | [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] ## Methods diff --git a/services/metalv1/docs/InstancesBatchCreateInputBatchesInner.md b/services/metalv1/docs/InstancesBatchCreateInputBatchesInner.md index 5065565f..e89ad011 100644 --- a/services/metalv1/docs/InstancesBatchCreateInputBatchesInner.md +++ b/services/metalv1/docs/InstancesBatchCreateInputBatchesInner.md @@ -12,10 +12,10 @@ Name | Type | Description | Notes **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://metal.equinix.com/developers/docs/deploy/reserved/) for more details. | [optional] [default to ""] +**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://metal.equinix.com/developers/docs/operating-systems/custom-ipxe/) for more details. | [optional] +**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] @@ -31,7 +31,7 @@ Name | Type | Description | Notes **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://metal.equinix.com/developers/docs/servers/user-data/) and [Provisioning with Custom iPXE](https://metal.equinix.com/developers/docs/operating-systems/custom-ipxe/#provisioning-with-custom-ipxe) for more details. | [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 diff --git a/services/metalv1/docs/OTPsApi.md b/services/metalv1/docs/OTPsApi.md deleted file mode 100644 index 0c00e34f..00000000 --- a/services/metalv1/docs/OTPsApi.md +++ /dev/null @@ -1,323 +0,0 @@ -# \OTPsApi - -All URIs are relative to *https://api.equinix.com/metal/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**FindEnsureOtp**](OTPsApi.md#FindEnsureOtp) | **Post** /user/otp/verify/{otp} | Verify user by providing an OTP -[**FindRecoveryCodes**](OTPsApi.md#FindRecoveryCodes) | **Get** /user/otp/recovery-codes | Retrieve my recovery codes -[**ReceiveCodes**](OTPsApi.md#ReceiveCodes) | **Post** /user/otp/sms/receive | Receive an OTP per sms -[**RegenerateCodes**](OTPsApi.md#RegenerateCodes) | **Post** /user/otp/recovery-codes | Generate new recovery codes -[**SeedApp**](OTPsApi.md#SeedApp) | **Post** /user/otp/app/receive | Issue OTP seeds - - - -## FindEnsureOtp - -> FindEnsureOtp(ctx, otp).Execute() - -Verify user by providing an OTP - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/equinix/equinix-sdk-go/services/metalv1" -) - -func main() { - otp := "otp_example" // string | OTP - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - r, err := apiClient.OTPsApi.FindEnsureOtp(context.Background(), otp).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OTPsApi.FindEnsureOtp``: %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. -**otp** | **string** | OTP | - -### Other Parameters - -Other parameters are passed through a pointer to a apiFindEnsureOtpRequest 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) - - -## FindRecoveryCodes - -> RecoveryCodeList FindRecoveryCodes(ctx).Execute() - -Retrieve my recovery codes - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/equinix/equinix-sdk-go/services/metalv1" -) - -func main() { - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.OTPsApi.FindRecoveryCodes(context.Background()).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OTPsApi.FindRecoveryCodes``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `FindRecoveryCodes`: RecoveryCodeList - fmt.Fprintf(os.Stdout, "Response from `OTPsApi.FindRecoveryCodes`: %v\n", resp) -} -``` - -### Path Parameters - -This endpoint does not need any parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a apiFindRecoveryCodesRequest struct via the builder pattern - - -### Return type - -[**RecoveryCodeList**](RecoveryCodeList.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) - - -## ReceiveCodes - -> ReceiveCodes(ctx).Execute() - -Receive an OTP per sms - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/equinix/equinix-sdk-go/services/metalv1" -) - -func main() { - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - r, err := apiClient.OTPsApi.ReceiveCodes(context.Background()).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OTPsApi.ReceiveCodes``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - -This endpoint does not need any parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a apiReceiveCodesRequest struct via the builder pattern - - -### 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) - - -## RegenerateCodes - -> RecoveryCodeList RegenerateCodes(ctx).Execute() - -Generate new recovery codes - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/equinix/equinix-sdk-go/services/metalv1" -) - -func main() { - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.OTPsApi.RegenerateCodes(context.Background()).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OTPsApi.RegenerateCodes``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `RegenerateCodes`: RecoveryCodeList - fmt.Fprintf(os.Stdout, "Response from `OTPsApi.RegenerateCodes`: %v\n", resp) -} -``` - -### Path Parameters - -This endpoint does not need any parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a apiRegenerateCodesRequest struct via the builder pattern - - -### Return type - -[**RecoveryCodeList**](RecoveryCodeList.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) - - -## SeedApp - -> OtpSeed SeedApp(ctx).Execute() - -Issue OTP seeds - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/equinix/equinix-sdk-go/services/metalv1" -) - -func main() { - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.OTPsApi.SeedApp(context.Background()).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OTPsApi.SeedApp``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `SeedApp`: OtpSeed - fmt.Fprintf(os.Stdout, "Response from `OTPsApi.SeedApp`: %v\n", resp) -} -``` - -### Path Parameters - -This endpoint does not need any parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a apiSeedAppRequest struct via the builder pattern - - -### Return type - -[**OtpSeed**](OtpSeed.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/Organization.md b/services/metalv1/docs/Organization.md index 06e83141..240e74d2 100644 --- a/services/metalv1/docs/Organization.md +++ b/services/metalv1/docs/Organization.md @@ -11,6 +11,7 @@ Name | Type | Description | Notes **Customdata** | Pointer to **map[string]interface{}** | | [optional] **Description** | Pointer to **string** | | [optional] **Enforce2faAt** | Pointer to **time.Time** | Force to all members to have enabled the two factor authentication after that date, unless the value is null | [optional] +**Href** | Pointer to **string** | | [optional] **Id** | Pointer to **string** | | [optional] **Logo** | Pointer to **string** | | [optional] **Members** | Pointer to [**[]Href**](Href.md) | | [optional] @@ -216,6 +217,31 @@ SetEnforce2faAt sets Enforce2faAt field to given value. HasEnforce2faAt returns a boolean if a field has been set. +### GetHref + +`func (o *Organization) GetHref() string` + +GetHref returns the Href field if non-nil, zero value otherwise. + +### GetHrefOk + +`func (o *Organization) 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 *Organization) SetHref(v string)` + +SetHref sets Href field to given value. + +### HasHref + +`func (o *Organization) HasHref() bool` + +HasHref returns a boolean if a field has been set. + ### GetId `func (o *Organization) GetId() string` diff --git a/services/metalv1/docs/OtpSeed.md b/services/metalv1/docs/OtpSeed.md deleted file mode 100644 index 84401c5b..00000000 --- a/services/metalv1/docs/OtpSeed.md +++ /dev/null @@ -1,56 +0,0 @@ -# OtpSeed - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**OtpUri** | Pointer to **string** | The URI to use in your MFA app | [optional] - -## Methods - -### NewOtpSeed - -`func NewOtpSeed() *OtpSeed` - -NewOtpSeed instantiates a new OtpSeed 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 - -### NewOtpSeedWithDefaults - -`func NewOtpSeedWithDefaults() *OtpSeed` - -NewOtpSeedWithDefaults instantiates a new OtpSeed 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 - -### GetOtpUri - -`func (o *OtpSeed) GetOtpUri() string` - -GetOtpUri returns the OtpUri field if non-nil, zero value otherwise. - -### GetOtpUriOk - -`func (o *OtpSeed) GetOtpUriOk() (*string, bool)` - -GetOtpUriOk returns a tuple with the OtpUri field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetOtpUri - -`func (o *OtpSeed) SetOtpUri(v string)` - -SetOtpUri sets OtpUri field to given value. - -### HasOtpUri - -`func (o *OtpSeed) HasOtpUri() bool` - -HasOtpUri 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/Project.md b/services/metalv1/docs/Project.md index 40c644c2..9d7977d8 100644 --- a/services/metalv1/docs/Project.md +++ b/services/metalv1/docs/Project.md @@ -4,6 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**BackendTransferEnabled** | Pointer to **bool** | | [optional] **BgpConfig** | Pointer to [**Href**](Href.md) | | [optional] **CreatedAt** | Pointer to **time.Time** | | [optional] **Customdata** | Pointer to **map[string]interface{}** | | [optional] @@ -44,6 +45,31 @@ NewProjectWithDefaults instantiates a new Project 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 +### GetBackendTransferEnabled + +`func (o *Project) GetBackendTransferEnabled() bool` + +GetBackendTransferEnabled returns the BackendTransferEnabled field if non-nil, zero value otherwise. + +### GetBackendTransferEnabledOk + +`func (o *Project) GetBackendTransferEnabledOk() (*bool, bool)` + +GetBackendTransferEnabledOk returns a tuple with the BackendTransferEnabled field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBackendTransferEnabled + +`func (o *Project) SetBackendTransferEnabled(v bool)` + +SetBackendTransferEnabled sets BackendTransferEnabled field to given value. + +### HasBackendTransferEnabled + +`func (o *Project) HasBackendTransferEnabled() bool` + +HasBackendTransferEnabled returns a boolean if a field has been set. + ### GetBgpConfig `func (o *Project) GetBgpConfig() Href` diff --git a/services/metalv1/docs/RecoveryCodeList.md b/services/metalv1/docs/RecoveryCodeList.md deleted file mode 100644 index 3a3080b5..00000000 --- a/services/metalv1/docs/RecoveryCodeList.md +++ /dev/null @@ -1,56 +0,0 @@ -# RecoveryCodeList - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**RecoveryCodes** | Pointer to **[]string** | | [optional] - -## Methods - -### NewRecoveryCodeList - -`func NewRecoveryCodeList() *RecoveryCodeList` - -NewRecoveryCodeList instantiates a new RecoveryCodeList 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 - -### NewRecoveryCodeListWithDefaults - -`func NewRecoveryCodeListWithDefaults() *RecoveryCodeList` - -NewRecoveryCodeListWithDefaults instantiates a new RecoveryCodeList 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 - -### GetRecoveryCodes - -`func (o *RecoveryCodeList) GetRecoveryCodes() []string` - -GetRecoveryCodes returns the RecoveryCodes field if non-nil, zero value otherwise. - -### GetRecoveryCodesOk - -`func (o *RecoveryCodeList) GetRecoveryCodesOk() (*[]string, bool)` - -GetRecoveryCodesOk returns a tuple with the RecoveryCodes field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetRecoveryCodes - -`func (o *RecoveryCodeList) SetRecoveryCodes(v []string)` - -SetRecoveryCodes sets RecoveryCodes field to given value. - -### HasRecoveryCodes - -`func (o *RecoveryCodeList) HasRecoveryCodes() bool` - -HasRecoveryCodes 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/SelfServiceReservationItemRequest.md b/services/metalv1/docs/SelfServiceReservationItemRequest.md index 124685a3..3b221915 100644 --- a/services/metalv1/docs/SelfServiceReservationItemRequest.md +++ b/services/metalv1/docs/SelfServiceReservationItemRequest.md @@ -4,11 +4,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Amount** | Pointer to **float32** | | [optional] -**MetroId** | Pointer to **string** | | [optional] -**PlanId** | Pointer to **string** | | [optional] -**Quantity** | Pointer to **int32** | | [optional] -**Term** | Pointer to **string** | | [optional] +**MetroId** | Pointer to **string** | Metro ID of the item. | [optional] +**PlanId** | Pointer to **string** | Plan ID of the item. | [optional] +**Quantity** | Pointer to **int32** | Number of items. | [optional] +**Term** | Pointer to **string** | Contract term of the item. | [optional] ## Methods @@ -29,31 +28,6 @@ NewSelfServiceReservationItemRequestWithDefaults instantiates a new SelfServiceR 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 -### GetAmount - -`func (o *SelfServiceReservationItemRequest) GetAmount() float32` - -GetAmount returns the Amount field if non-nil, zero value otherwise. - -### GetAmountOk - -`func (o *SelfServiceReservationItemRequest) GetAmountOk() (*float32, bool)` - -GetAmountOk returns a tuple with the Amount field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAmount - -`func (o *SelfServiceReservationItemRequest) SetAmount(v float32)` - -SetAmount sets Amount field to given value. - -### HasAmount - -`func (o *SelfServiceReservationItemRequest) HasAmount() bool` - -HasAmount returns a boolean if a field has been set. - ### GetMetroId `func (o *SelfServiceReservationItemRequest) GetMetroId() string` diff --git a/services/metalv1/docs/TwoFactorAuthApi.md b/services/metalv1/docs/TwoFactorAuthApi.md index 93734735..8f831ddf 100644 --- a/services/metalv1/docs/TwoFactorAuthApi.md +++ b/services/metalv1/docs/TwoFactorAuthApi.md @@ -5,9 +5,7 @@ All URIs are relative to *https://api.equinix.com/metal/v1* Method | HTTP request | Description ------------- | ------------- | ------------- [**DisableTfaApp**](TwoFactorAuthApi.md#DisableTfaApp) | **Delete** /user/otp/app | Disable two factor authentication -[**DisableTfaSms**](TwoFactorAuthApi.md#DisableTfaSms) | **Delete** /user/otp/sms | Disable two factor authentication [**EnableTfaApp**](TwoFactorAuthApi.md#EnableTfaApp) | **Post** /user/otp/app | Enable two factor auth using app -[**EnableTfaSms**](TwoFactorAuthApi.md#EnableTfaSms) | **Post** /user/otp/sms | Enable two factor auth using sms @@ -75,70 +73,6 @@ Name | Type | Description | Notes [[Back to README]](../README.md) -## DisableTfaSms - -> DisableTfaSms(ctx).XOtpToken(xOtpToken).Execute() - -Disable two factor authentication - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/equinix/equinix-sdk-go/services/metalv1" -) - -func main() { - xOtpToken := "xOtpToken_example" // string | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - r, err := apiClient.TwoFactorAuthApi.DisableTfaSms(context.Background()).XOtpToken(xOtpToken).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `TwoFactorAuthApi.DisableTfaSms``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiDisableTfaSmsRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **xOtpToken** | **string** | | - -### 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) - - ## EnableTfaApp > EnableTfaApp(ctx).XOtpToken(xOtpToken).Execute() @@ -202,67 +136,3 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -## EnableTfaSms - -> EnableTfaSms(ctx).XOtpToken(xOtpToken).Execute() - -Enable two factor auth using sms - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/equinix/equinix-sdk-go/services/metalv1" -) - -func main() { - xOtpToken := "xOtpToken_example" // string | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - r, err := apiClient.TwoFactorAuthApi.EnableTfaSms(context.Background()).XOtpToken(xOtpToken).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `TwoFactorAuthApi.EnableTfaSms``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiEnableTfaSmsRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **xOtpToken** | **string** | | - -### 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) - diff --git a/services/metalv1/model_auth_token_project.go b/services/metalv1/model_auth_token_project.go index 78c1e1cf..65986aa6 100644 --- a/services/metalv1/model_auth_token_project.go +++ b/services/metalv1/model_auth_token_project.go @@ -18,16 +18,17 @@ var _ MappedNullable = &AuthTokenProject{} // AuthTokenProject struct for AuthTokenProject type AuthTokenProject struct { - BgpConfig *Href `json:"bgp_config,omitempty"` - CreatedAt *time.Time `json:"created_at,omitempty"` - Customdata map[string]interface{} `json:"customdata,omitempty"` - Devices []Href `json:"devices,omitempty"` - Href *string `json:"href,omitempty"` - Id *string `json:"id,omitempty"` - Invitations []Href `json:"invitations,omitempty"` - MaxDevices map[string]interface{} `json:"max_devices,omitempty"` - Members []Href `json:"members,omitempty"` - Memberships []Href `json:"memberships,omitempty"` + BackendTransferEnabled *bool `json:"backend_transfer_enabled,omitempty"` + BgpConfig *Href `json:"bgp_config,omitempty"` + CreatedAt *time.Time `json:"created_at,omitempty"` + Customdata map[string]interface{} `json:"customdata,omitempty"` + Devices []Href `json:"devices,omitempty"` + Href *string `json:"href,omitempty"` + Id *string `json:"id,omitempty"` + Invitations []Href `json:"invitations,omitempty"` + MaxDevices map[string]interface{} `json:"max_devices,omitempty"` + Members []Href `json:"members,omitempty"` + Memberships []Href `json:"memberships,omitempty"` // The name of the project. Cannot contain characters encoded in greater than 3 bytes such as emojis. Name *string `json:"name,omitempty"` NetworkStatus map[string]interface{} `json:"network_status,omitempty"` @@ -61,6 +62,38 @@ func NewAuthTokenProjectWithDefaults() *AuthTokenProject { return &this } +// GetBackendTransferEnabled returns the BackendTransferEnabled field value if set, zero value otherwise. +func (o *AuthTokenProject) GetBackendTransferEnabled() bool { + if o == nil || IsNil(o.BackendTransferEnabled) { + var ret bool + return ret + } + return *o.BackendTransferEnabled +} + +// GetBackendTransferEnabledOk returns a tuple with the BackendTransferEnabled field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AuthTokenProject) GetBackendTransferEnabledOk() (*bool, bool) { + if o == nil || IsNil(o.BackendTransferEnabled) { + return nil, false + } + return o.BackendTransferEnabled, true +} + +// HasBackendTransferEnabled returns a boolean if a field has been set. +func (o *AuthTokenProject) HasBackendTransferEnabled() bool { + if o != nil && !IsNil(o.BackendTransferEnabled) { + return true + } + + return false +} + +// SetBackendTransferEnabled gets a reference to the given bool and assigns it to the BackendTransferEnabled field. +func (o *AuthTokenProject) SetBackendTransferEnabled(v bool) { + o.BackendTransferEnabled = &v +} + // GetBgpConfig returns the BgpConfig field value if set, zero value otherwise. func (o *AuthTokenProject) GetBgpConfig() Href { if o == nil || IsNil(o.BgpConfig) { @@ -711,6 +744,9 @@ func (o AuthTokenProject) MarshalJSON() ([]byte, error) { func (o AuthTokenProject) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} + if !IsNil(o.BackendTransferEnabled) { + toSerialize["backend_transfer_enabled"] = o.BackendTransferEnabled + } if !IsNil(o.BgpConfig) { toSerialize["bgp_config"] = o.BgpConfig } @@ -793,6 +829,7 @@ func (o *AuthTokenProject) UnmarshalJSON(data []byte) (err error) { additionalProperties := make(map[string]interface{}) if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "backend_transfer_enabled") delete(additionalProperties, "bgp_config") delete(additionalProperties, "created_at") delete(additionalProperties, "customdata") diff --git a/services/metalv1/model_device_create_in_facility_input.go b/services/metalv1/model_device_create_in_facility_input.go index fed6a9b8..432f5058 100644 --- a/services/metalv1/model_device_create_in_facility_input.go +++ b/services/metalv1/model_device_create_in_facility_input.go @@ -31,13 +31,13 @@ type DeviceCreateInFacilityInput struct { Description *string `json:"description,omitempty"` // 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. Features []string `json:"features,omitempty"` - // 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://metal.equinix.com/developers/docs/deploy/reserved/) for more details. + // 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. HardwareReservationId *string `json:"hardware_reservation_id,omitempty"` // The hostname to use within the operating system. The same hostname may be used on multiple devices within a project. Hostname *string `json:"hostname,omitempty"` // 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. IpAddresses []IPAddress `json:"ip_addresses,omitempty"` - // When set, the device will chainload an iPXE Script at boot fetched from the supplied URL. See [Custom iPXE](https://metal.equinix.com/developers/docs/operating-systems/custom-ipxe/) for more details. + // 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. IpxeScriptUrl *string `json:"ipxe_script_url,omitempty"` // Whether the device should be locked, preventing accidental deletion. Locked *bool `json:"locked,omitempty"` @@ -67,7 +67,7 @@ type DeviceCreateInFacilityInput struct { TerminationTime *time.Time `json:"termination_time,omitempty"` // 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://metal.equinix.com/developers/docs/servers/user-data/) and [Provisioning with Custom iPXE](https://metal.equinix.com/developers/docs/operating-systems/custom-ipxe/#provisioning-with-custom-ipxe) for more details. + // 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"` AdditionalProperties map[string]interface{} } diff --git a/services/metalv1/model_device_create_in_metro_input.go b/services/metalv1/model_device_create_in_metro_input.go index 57780344..12c2a797 100644 --- a/services/metalv1/model_device_create_in_metro_input.go +++ b/services/metalv1/model_device_create_in_metro_input.go @@ -30,13 +30,13 @@ type DeviceCreateInMetroInput struct { Description *string `json:"description,omitempty"` // 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. Features []string `json:"features,omitempty"` - // 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://metal.equinix.com/developers/docs/deploy/reserved/) for more details. + // 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. HardwareReservationId *string `json:"hardware_reservation_id,omitempty"` // The hostname to use within the operating system. The same hostname may be used on multiple devices within a project. Hostname *string `json:"hostname,omitempty"` // 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. IpAddresses []IPAddress `json:"ip_addresses,omitempty"` - // When set, the device will chainload an iPXE Script at boot fetched from the supplied URL. See [Custom iPXE](https://metal.equinix.com/developers/docs/operating-systems/custom-ipxe/) for more details. + // 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. IpxeScriptUrl *string `json:"ipxe_script_url,omitempty"` // Whether the device should be locked, preventing accidental deletion. Locked *bool `json:"locked,omitempty"` @@ -66,7 +66,7 @@ type DeviceCreateInMetroInput struct { TerminationTime *time.Time `json:"termination_time,omitempty"` // 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://metal.equinix.com/developers/docs/servers/user-data/) and [Provisioning with Custom iPXE](https://metal.equinix.com/developers/docs/operating-systems/custom-ipxe/#provisioning-with-custom-ipxe) for more details. + // 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"` AdditionalProperties map[string]interface{} } diff --git a/services/metalv1/model_device_create_input.go b/services/metalv1/model_device_create_input.go index d8e9d969..2b9c4b83 100644 --- a/services/metalv1/model_device_create_input.go +++ b/services/metalv1/model_device_create_input.go @@ -28,13 +28,13 @@ type DeviceCreateInput struct { Description *string `json:"description,omitempty"` // 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. Features []string `json:"features,omitempty"` - // 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://metal.equinix.com/developers/docs/deploy/reserved/) for more details. + // 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. HardwareReservationId *string `json:"hardware_reservation_id,omitempty"` // The hostname to use within the operating system. The same hostname may be used on multiple devices within a project. Hostname *string `json:"hostname,omitempty"` // 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. IpAddresses []IPAddress `json:"ip_addresses,omitempty"` - // When set, the device will chainload an iPXE Script at boot fetched from the supplied URL. See [Custom iPXE](https://metal.equinix.com/developers/docs/operating-systems/custom-ipxe/) for more details. + // 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. IpxeScriptUrl *string `json:"ipxe_script_url,omitempty"` // Whether the device should be locked, preventing accidental deletion. Locked *bool `json:"locked,omitempty"` @@ -64,7 +64,7 @@ type DeviceCreateInput struct { TerminationTime *time.Time `json:"termination_time,omitempty"` // 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://metal.equinix.com/developers/docs/servers/user-data/) and [Provisioning with Custom iPXE](https://metal.equinix.com/developers/docs/operating-systems/custom-ipxe/#provisioning-with-custom-ipxe) for more details. + // 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"` AdditionalProperties map[string]interface{} } 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 5c62cfd6..c85927a4 100644 --- a/services/metalv1/model_instances_batch_create_input_batches_inner.go +++ b/services/metalv1/model_instances_batch_create_input_batches_inner.go @@ -33,13 +33,13 @@ type InstancesBatchCreateInputBatchesInner struct { Description *string `json:"description,omitempty"` // 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. Features []string `json:"features,omitempty"` - // 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://metal.equinix.com/developers/docs/deploy/reserved/) for more details. + // 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. HardwareReservationId *string `json:"hardware_reservation_id,omitempty"` // The hostname to use within the operating system. The same hostname may be used on multiple devices within a project. Hostname *string `json:"hostname,omitempty"` // 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. IpAddresses []IPAddress `json:"ip_addresses,omitempty"` - // When set, the device will chainload an iPXE Script at boot fetched from the supplied URL. See [Custom iPXE](https://metal.equinix.com/developers/docs/operating-systems/custom-ipxe/) for more details. + // 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. IpxeScriptUrl *string `json:"ipxe_script_url,omitempty"` // Whether the device should be locked, preventing accidental deletion. Locked *bool `json:"locked,omitempty"` @@ -69,7 +69,7 @@ type InstancesBatchCreateInputBatchesInner struct { TerminationTime *time.Time `json:"termination_time,omitempty"` // 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://metal.equinix.com/developers/docs/servers/user-data/) and [Provisioning with Custom iPXE](https://metal.equinix.com/developers/docs/operating-systems/custom-ipxe/#provisioning-with-custom-ipxe) for more details. + // 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 diff --git a/services/metalv1/model_organization.go b/services/metalv1/model_organization.go index 9f7c5b59..f87ceb1a 100644 --- a/services/metalv1/model_organization.go +++ b/services/metalv1/model_organization.go @@ -26,6 +26,7 @@ type Organization struct { Description *string `json:"description,omitempty"` // Force to all members to have enabled the two factor authentication after that date, unless the value is null Enforce2faAt *time.Time `json:"enforce_2fa_at,omitempty"` + Href *string `json:"href,omitempty"` Id *string `json:"id,omitempty"` Logo *string `json:"logo,omitempty"` Members []Href `json:"members,omitempty"` @@ -282,6 +283,38 @@ func (o *Organization) SetEnforce2faAt(v time.Time) { o.Enforce2faAt = &v } +// GetHref returns the Href field value if set, zero value otherwise. +func (o *Organization) 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 *Organization) 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 *Organization) 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 *Organization) SetHref(v string) { + o.Href = &v +} + // GetId returns the Id field value if set, zero value otherwise. func (o *Organization) GetId() string { if o == nil || IsNil(o.Id) { @@ -633,6 +666,9 @@ func (o Organization) ToMap() (map[string]interface{}, error) { if !IsNil(o.Enforce2faAt) { toSerialize["enforce_2fa_at"] = o.Enforce2faAt } + if !IsNil(o.Href) { + toSerialize["href"] = o.Href + } if !IsNil(o.Id) { toSerialize["id"] = o.Id } @@ -692,6 +728,7 @@ func (o *Organization) UnmarshalJSON(data []byte) (err error) { delete(additionalProperties, "customdata") delete(additionalProperties, "description") delete(additionalProperties, "enforce_2fa_at") + delete(additionalProperties, "href") delete(additionalProperties, "id") delete(additionalProperties, "logo") delete(additionalProperties, "members") diff --git a/services/metalv1/model_otp_seed.go b/services/metalv1/model_otp_seed.go deleted file mode 100644 index 4eb4d2fb..00000000 --- a/services/metalv1/model_otp_seed.go +++ /dev/null @@ -1,152 +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" -) - -// checks if the OtpSeed type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &OtpSeed{} - -// OtpSeed Details for configuring your MFA app -type OtpSeed struct { - // The URI to use in your MFA app - OtpUri *string `json:"otp_uri,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _OtpSeed OtpSeed - -// NewOtpSeed instantiates a new OtpSeed 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 NewOtpSeed() *OtpSeed { - this := OtpSeed{} - return &this -} - -// NewOtpSeedWithDefaults instantiates a new OtpSeed 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 NewOtpSeedWithDefaults() *OtpSeed { - this := OtpSeed{} - return &this -} - -// GetOtpUri returns the OtpUri field value if set, zero value otherwise. -func (o *OtpSeed) GetOtpUri() string { - if o == nil || IsNil(o.OtpUri) { - var ret string - return ret - } - return *o.OtpUri -} - -// GetOtpUriOk returns a tuple with the OtpUri field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *OtpSeed) GetOtpUriOk() (*string, bool) { - if o == nil || IsNil(o.OtpUri) { - return nil, false - } - return o.OtpUri, true -} - -// HasOtpUri returns a boolean if a field has been set. -func (o *OtpSeed) HasOtpUri() bool { - if o != nil && !IsNil(o.OtpUri) { - return true - } - - return false -} - -// SetOtpUri gets a reference to the given string and assigns it to the OtpUri field. -func (o *OtpSeed) SetOtpUri(v string) { - o.OtpUri = &v -} - -func (o OtpSeed) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o OtpSeed) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.OtpUri) { - toSerialize["otp_uri"] = o.OtpUri - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *OtpSeed) UnmarshalJSON(data []byte) (err error) { - varOtpSeed := _OtpSeed{} - - err = json.Unmarshal(data, &varOtpSeed) - - if err != nil { - return err - } - - *o = OtpSeed(varOtpSeed) - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(data, &additionalProperties); err == nil { - delete(additionalProperties, "otp_uri") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableOtpSeed struct { - value *OtpSeed - isSet bool -} - -func (v NullableOtpSeed) Get() *OtpSeed { - return v.value -} - -func (v *NullableOtpSeed) Set(val *OtpSeed) { - v.value = val - v.isSet = true -} - -func (v NullableOtpSeed) IsSet() bool { - return v.isSet -} - -func (v *NullableOtpSeed) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableOtpSeed(val *OtpSeed) *NullableOtpSeed { - return &NullableOtpSeed{value: val, isSet: true} -} - -func (v NullableOtpSeed) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableOtpSeed) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/metalv1/model_project.go b/services/metalv1/model_project.go index 8e278d23..07421d6d 100644 --- a/services/metalv1/model_project.go +++ b/services/metalv1/model_project.go @@ -18,16 +18,17 @@ var _ MappedNullable = &Project{} // Project struct for Project type Project struct { - BgpConfig *Href `json:"bgp_config,omitempty"` - CreatedAt *time.Time `json:"created_at,omitempty"` - Customdata map[string]interface{} `json:"customdata,omitempty"` - Devices []Href `json:"devices,omitempty"` - Href *string `json:"href,omitempty"` - Id *string `json:"id,omitempty"` - Invitations []Href `json:"invitations,omitempty"` - MaxDevices map[string]interface{} `json:"max_devices,omitempty"` - Members []Href `json:"members,omitempty"` - Memberships []Href `json:"memberships,omitempty"` + BackendTransferEnabled *bool `json:"backend_transfer_enabled,omitempty"` + BgpConfig *Href `json:"bgp_config,omitempty"` + CreatedAt *time.Time `json:"created_at,omitempty"` + Customdata map[string]interface{} `json:"customdata,omitempty"` + Devices []Href `json:"devices,omitempty"` + Href *string `json:"href,omitempty"` + Id *string `json:"id,omitempty"` + Invitations []Href `json:"invitations,omitempty"` + MaxDevices map[string]interface{} `json:"max_devices,omitempty"` + Members []Href `json:"members,omitempty"` + Memberships []Href `json:"memberships,omitempty"` // The name of the project. Cannot contain characters encoded in greater than 3 bytes such as emojis. Name *string `json:"name,omitempty"` NetworkStatus map[string]interface{} `json:"network_status,omitempty"` @@ -61,6 +62,38 @@ func NewProjectWithDefaults() *Project { return &this } +// GetBackendTransferEnabled returns the BackendTransferEnabled field value if set, zero value otherwise. +func (o *Project) GetBackendTransferEnabled() bool { + if o == nil || IsNil(o.BackendTransferEnabled) { + var ret bool + return ret + } + return *o.BackendTransferEnabled +} + +// GetBackendTransferEnabledOk returns a tuple with the BackendTransferEnabled field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Project) GetBackendTransferEnabledOk() (*bool, bool) { + if o == nil || IsNil(o.BackendTransferEnabled) { + return nil, false + } + return o.BackendTransferEnabled, true +} + +// HasBackendTransferEnabled returns a boolean if a field has been set. +func (o *Project) HasBackendTransferEnabled() bool { + if o != nil && !IsNil(o.BackendTransferEnabled) { + return true + } + + return false +} + +// SetBackendTransferEnabled gets a reference to the given bool and assigns it to the BackendTransferEnabled field. +func (o *Project) SetBackendTransferEnabled(v bool) { + o.BackendTransferEnabled = &v +} + // GetBgpConfig returns the BgpConfig field value if set, zero value otherwise. func (o *Project) GetBgpConfig() Href { if o == nil || IsNil(o.BgpConfig) { @@ -711,6 +744,9 @@ func (o Project) MarshalJSON() ([]byte, error) { func (o Project) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} + if !IsNil(o.BackendTransferEnabled) { + toSerialize["backend_transfer_enabled"] = o.BackendTransferEnabled + } if !IsNil(o.BgpConfig) { toSerialize["bgp_config"] = o.BgpConfig } @@ -793,6 +829,7 @@ func (o *Project) UnmarshalJSON(data []byte) (err error) { additionalProperties := make(map[string]interface{}) if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "backend_transfer_enabled") delete(additionalProperties, "bgp_config") delete(additionalProperties, "created_at") delete(additionalProperties, "customdata") diff --git a/services/metalv1/model_recovery_code_list.go b/services/metalv1/model_recovery_code_list.go deleted file mode 100644 index 341f341f..00000000 --- a/services/metalv1/model_recovery_code_list.go +++ /dev/null @@ -1,151 +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" -) - -// checks if the RecoveryCodeList type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &RecoveryCodeList{} - -// RecoveryCodeList struct for RecoveryCodeList -type RecoveryCodeList struct { - RecoveryCodes []string `json:"recovery_codes,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _RecoveryCodeList RecoveryCodeList - -// NewRecoveryCodeList instantiates a new RecoveryCodeList 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 NewRecoveryCodeList() *RecoveryCodeList { - this := RecoveryCodeList{} - return &this -} - -// NewRecoveryCodeListWithDefaults instantiates a new RecoveryCodeList 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 NewRecoveryCodeListWithDefaults() *RecoveryCodeList { - this := RecoveryCodeList{} - return &this -} - -// GetRecoveryCodes returns the RecoveryCodes field value if set, zero value otherwise. -func (o *RecoveryCodeList) GetRecoveryCodes() []string { - if o == nil || IsNil(o.RecoveryCodes) { - var ret []string - return ret - } - return o.RecoveryCodes -} - -// GetRecoveryCodesOk returns a tuple with the RecoveryCodes field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RecoveryCodeList) GetRecoveryCodesOk() ([]string, bool) { - if o == nil || IsNil(o.RecoveryCodes) { - return nil, false - } - return o.RecoveryCodes, true -} - -// HasRecoveryCodes returns a boolean if a field has been set. -func (o *RecoveryCodeList) HasRecoveryCodes() bool { - if o != nil && !IsNil(o.RecoveryCodes) { - return true - } - - return false -} - -// SetRecoveryCodes gets a reference to the given []string and assigns it to the RecoveryCodes field. -func (o *RecoveryCodeList) SetRecoveryCodes(v []string) { - o.RecoveryCodes = v -} - -func (o RecoveryCodeList) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o RecoveryCodeList) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.RecoveryCodes) { - toSerialize["recovery_codes"] = o.RecoveryCodes - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *RecoveryCodeList) UnmarshalJSON(data []byte) (err error) { - varRecoveryCodeList := _RecoveryCodeList{} - - err = json.Unmarshal(data, &varRecoveryCodeList) - - if err != nil { - return err - } - - *o = RecoveryCodeList(varRecoveryCodeList) - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(data, &additionalProperties); err == nil { - delete(additionalProperties, "recovery_codes") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableRecoveryCodeList struct { - value *RecoveryCodeList - isSet bool -} - -func (v NullableRecoveryCodeList) Get() *RecoveryCodeList { - return v.value -} - -func (v *NullableRecoveryCodeList) Set(val *RecoveryCodeList) { - v.value = val - v.isSet = true -} - -func (v NullableRecoveryCodeList) IsSet() bool { - return v.isSet -} - -func (v *NullableRecoveryCodeList) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableRecoveryCodeList(val *RecoveryCodeList) *NullableRecoveryCodeList { - return &NullableRecoveryCodeList{value: val, isSet: true} -} - -func (v NullableRecoveryCodeList) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableRecoveryCodeList) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/metalv1/model_self_service_reservation_item_request.go b/services/metalv1/model_self_service_reservation_item_request.go index 902c3216..1d8ee643 100644 --- a/services/metalv1/model_self_service_reservation_item_request.go +++ b/services/metalv1/model_self_service_reservation_item_request.go @@ -17,11 +17,14 @@ var _ MappedNullable = &SelfServiceReservationItemRequest{} // SelfServiceReservationItemRequest struct for SelfServiceReservationItemRequest type SelfServiceReservationItemRequest struct { - Amount *float32 `json:"amount,omitempty"` - MetroId *string `json:"metro_id,omitempty"` - PlanId *string `json:"plan_id,omitempty"` - Quantity *int32 `json:"quantity,omitempty"` - Term *string `json:"term,omitempty"` + // Metro ID of the item. + MetroId *string `json:"metro_id,omitempty"` + // Plan ID of the item. + PlanId *string `json:"plan_id,omitempty"` + // Number of items. + Quantity *int32 `json:"quantity,omitempty"` + // Contract term of the item. + Term *string `json:"term,omitempty"` AdditionalProperties map[string]interface{} } @@ -44,38 +47,6 @@ func NewSelfServiceReservationItemRequestWithDefaults() *SelfServiceReservationI return &this } -// GetAmount returns the Amount field value if set, zero value otherwise. -func (o *SelfServiceReservationItemRequest) GetAmount() float32 { - if o == nil || IsNil(o.Amount) { - var ret float32 - return ret - } - return *o.Amount -} - -// GetAmountOk returns a tuple with the Amount field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SelfServiceReservationItemRequest) GetAmountOk() (*float32, bool) { - if o == nil || IsNil(o.Amount) { - return nil, false - } - return o.Amount, true -} - -// HasAmount returns a boolean if a field has been set. -func (o *SelfServiceReservationItemRequest) HasAmount() bool { - if o != nil && !IsNil(o.Amount) { - return true - } - - return false -} - -// SetAmount gets a reference to the given float32 and assigns it to the Amount field. -func (o *SelfServiceReservationItemRequest) SetAmount(v float32) { - o.Amount = &v -} - // GetMetroId returns the MetroId field value if set, zero value otherwise. func (o *SelfServiceReservationItemRequest) GetMetroId() string { if o == nil || IsNil(o.MetroId) { @@ -214,9 +185,6 @@ func (o SelfServiceReservationItemRequest) MarshalJSON() ([]byte, error) { func (o SelfServiceReservationItemRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.Amount) { - toSerialize["amount"] = o.Amount - } if !IsNil(o.MetroId) { toSerialize["metro_id"] = o.MetroId } @@ -251,7 +219,6 @@ func (o *SelfServiceReservationItemRequest) UnmarshalJSON(data []byte) (err erro additionalProperties := make(map[string]interface{}) if err = json.Unmarshal(data, &additionalProperties); err == nil { - delete(additionalProperties, "amount") delete(additionalProperties, "metro_id") delete(additionalProperties, "plan_id") delete(additionalProperties, "quantity") diff --git a/services/metalv1/test/api_otps_test.go b/services/metalv1/test/api_otps_test.go deleted file mode 100644 index c0861c52..00000000 --- a/services/metalv1/test/api_otps_test.go +++ /dev/null @@ -1,74 +0,0 @@ -/* -Metal API - -Testing OTPsApiService - -*/ - -// 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_OTPsApiService(t *testing.T) { - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - - t.Run("Test OTPsApiService FindEnsureOtp", func(t *testing.T) { - t.Skip("skip test") // remove to run test - - var otp string - - httpRes, err := apiClient.OTPsApi.FindEnsureOtp(context.Background(), otp).Execute() - - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - }) - - t.Run("Test OTPsApiService FindRecoveryCodes", func(t *testing.T) { - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.OTPsApi.FindRecoveryCodes(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - }) - - t.Run("Test OTPsApiService ReceiveCodes", func(t *testing.T) { - t.Skip("skip test") // remove to run test - - httpRes, err := apiClient.OTPsApi.ReceiveCodes(context.Background()).Execute() - - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - }) - - t.Run("Test OTPsApiService RegenerateCodes", func(t *testing.T) { - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.OTPsApi.RegenerateCodes(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - }) - - t.Run("Test OTPsApiService SeedApp", func(t *testing.T) { - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.OTPsApi.SeedApp(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - }) -} diff --git a/services/metalv1/test/api_two_factor_auth_test.go b/services/metalv1/test/api_two_factor_auth_test.go index c5a5a608..b9aa53dc 100644 --- a/services/metalv1/test/api_two_factor_auth_test.go +++ b/services/metalv1/test/api_two_factor_auth_test.go @@ -31,15 +31,6 @@ func Test_metalv1_TwoFactorAuthApiService(t *testing.T) { assert.Equal(t, 200, httpRes.StatusCode) }) - t.Run("Test TwoFactorAuthApiService DisableTfaSms", func(t *testing.T) { - t.Skip("skip test") // remove to run test - - httpRes, err := apiClient.TwoFactorAuthApi.DisableTfaSms(context.Background()).Execute() - - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - }) - t.Run("Test TwoFactorAuthApiService EnableTfaApp", func(t *testing.T) { t.Skip("skip test") // remove to run test @@ -48,13 +39,4 @@ func Test_metalv1_TwoFactorAuthApiService(t *testing.T) { require.Nil(t, err) assert.Equal(t, 200, httpRes.StatusCode) }) - - t.Run("Test TwoFactorAuthApiService EnableTfaSms", func(t *testing.T) { - t.Skip("skip test") // remove to run test - - httpRes, err := apiClient.TwoFactorAuthApi.EnableTfaSms(context.Background()).Execute() - - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - }) }